This topic is locked
[SOLVED]

 Uncaught TypeError: Object #<Object> has no method 'getCon

3/21/2011 11:20:50 PM
PHPRunner General questions
S
stiven author

Hello,
this is on edit page on javascript onload event.
I have a field on my form 'lock_avion' is a checkbox if "Lock" is checked after saving the data i need some fields to be disable and 'lock_avion' field to be hidden next time they want to edit the form. and only if the user logged in is 'Joan' the control 'lock_avion' will show. I already add the php code snippet to the page to get the username. but im getting this error "Uncaught TypeError: Object #<Object> has no method 'getControl'" and i cant solve this please help. also when i upload this to the server all my date fields on the form go blank and disabled...
echo "<script>

window.username = '" . $_SESSION["UserID"]. "';

window.group = '" . $_SESSION["GroupID"]. "';

</script>";


var ctrlLock = Runner.getControl(pageid, 'lock_avion');

var ctrlRut5 = Runner.getControl(pageid, 'RutaPasajero5');

var ctrlVal = ctrlLock.getValue();
if (ctrlVal == 'Lock' && username != 'Joan')

{

ctrlRut5.setDisabled();

ctrlLock.hide();

}
Sergey Kornilov admin 3/22/2011

Your syntax looks correct.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.