Jquery wildcard match - easily field reference even in popup JS forms |
7/25/2011 12:48:16 PM |
PHPRunner Tips and Tricks | |
F
FunkDaddy author
I'm Using PHPR 5.3 (build 7474)... ever since introduction of add/edit/view popup forms field ID's are generated dynamically each time form is open... therefore we can no longer rely on standard JS notation sucn as "document.getElementById(fieldname').value;" etc. Instead we are now supposed to use the JS API as per the PHPR online manual (http://xlinesoft.com/phprunner/docs/javascript_api.htm), that takes care of the problem. HOWEVER... I noticed that the JS API does not work inside the "custom button" button feature of PHPR (Client Before, OnServer, Client After).
|
|
C
|
cgphp 7/25/2011 |
This, instead, selects all elements with an id starting with "value_Discount_Amount": $("*[id^='value_Discount_Amount']") |