- Posts: 1
- Thank you received: 0
Uncaught Error: Syntax error, unrecognized expression: #
- Dario Bi
- Topic Author
- Offline
- New Member
-
Less
More
5 years 5 months ago - 5 years 5 months ago #138394
by Dario Bi
Uncaught Error: Syntax error, unrecognized expression: # was created by Dario Bi
Hi, making a custom field dependencies i get a javascript error "Uncaught Error: Syntax error, unrecognized expression: #" (on line 446 of paymentmethods.js).
I made a radio button custom field, then two text custom field dependent on radio button.
When I choose radio button, fields disappears and this is ok. But when I try to show fields pressing radio button i got that error.
Examining the code on media/com_osmembership/assets/js/paymentmethods.js i saw that in the line 456 there's a for loop where the last value is empty. When the line
tries to hide the element hideFields, it's empty and i get that error. Modifying the code with
the problem does not appear anymore. i don't know if i clearly explained the problem, i'm sorry.
the code starting from line 456 was:
i changed that in:
Maybe I made some mistake?
I made a radio button custom field, then two text custom field dependent on radio button.
When I choose radio button, fields disappears and this is ok. But when I try to show fields pressing radio button i got that error.
Examining the code on media/com_osmembership/assets/js/paymentmethods.js i saw that in the line 456 there's a for loop where the last value is empty. When the line
Code:
$('#' + hideFields[i]).hide();
Code:
if(hideFields[i] != '')
the code starting from line 456 was:
Code:
for (i = 0; i < hideFields.length; i++) {
$('#' + hideFields[i]).hide();
}
for (i = 0; i < showFields.length; i++) {
$('#' + showFields[i]).show();
}
Code:
for (i = 0; i < hideFields.length; i++) {
if(hideFields[i] != '')
$('#' + hideFields[i]).hide();
}
for (i = 0; i < showFields.length; i++) {
if(showFields[i] != '')
$('#' + showFields[i]).show();
}
Last edit: 5 years 5 months ago by Dario Bi.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
5 years 5 months ago #138402
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Uncaught Error: Syntax error, unrecognized expression: #
Hello
Yes, maybe so. For this, please help submitting a support ticket sending us:
- Super admin account of the site
- Link to the page which we can see this error
- Tell me ID of the radio custom field you are talking about
I will check to see what's wrong and get it sorted
Regards,
Tuan
Yes, maybe so. For this, please help submitting a support ticket sending us:
- Super admin account of the site
- Link to the page which we can see this error
- Tell me ID of the radio custom field you are talking about
I will check to see what's wrong and get it sorted
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.