[SOLVED] Â Access controls in button Javascript using popup Add/Edit |
4/13/2011 11:40:36 PM |
PHPRunner General questions | |
A
alang author
As a few other posts have mentioned there is some difficulty in accessing controls inside the ClientBefore and ClientAfter event code since there is no access to the pageid required by Runner.getControl() function. There is a tip which covers this but I am guessing this would only work on the standard add/edit pages and not on the "popup" versions - I have verified that the pageid changes on subsequent displays of the popup - ie it is not always '1' and the tip does admit to it being a 'hack'. |
|
J
|
Jane 4/14/2011 |
Hi, // Get all the controls for the table |
A
|
alang author 4/15/2011 |
Thanks Jane - good to know about 'this.tName' as a generic parameter as the manual example indicates specifying the table explicitly. |
J
|
Jane 4/15/2011 |
Unfortunately there is no built-in PHPRunner function to return name of the control in this code. var ctrl = recCtrlsArr[i]; |
A
|
alang author 4/15/2011 |
That is a bit of a draw-back. Can I suggest that it would be useful to add this in the next version. I can imagine that it would be a requirement in many situations as the way you have implemented this button code is really useful.
|