This topic is locked
[SOLVED]

 Javascript Onload Event

6/26/2014 7:43:30 AM
PHPRunner General questions
M
msalim author

The script below used to work flawlessly, now suddenly it stopped working, please help
var ctrlLocationAccess = Runner.getControl(pageid, 'LocationAccess'); // Radio Button

var ctrlAdminAccess = Runner.getControl(pageid, 'AdminAccess'); // Check Box
var ctrlALoc = Runner.getControl(pageid, 'ALoc'); // Check Box

var ctrlELoc = Runner.getControl(pageid, 'ELoc'); // Check Box

var ctrlVLoc = Runner.getControl(pageid, 'VLoc'); // Check Box

var ctrlDLoc = Runner.getControl(pageid, 'DLoc'); // Check Box
// Update Values if AdminAccess is Changed
ctrlAdminAccess.on('click', function(e) {
if(this.getDispElem().is(':checked'))

{

ctrlLocationAccess.setValue('Yes');

ctrlALoc.getDispElem().attr('checked',true);

ctrlELoc.getDispElem().attr('checked',true);

ctrlDLoc.getDispElem().attr('checked',true);

ctrlVLoc.getDispElem().attr('checked',true);

}

});
PHPRunner 7.1 Build 21342

admin 6/26/2014

Check for Javascripts errors if any. Here is the article that can help:

http://xlinesoft.com/blog/2012/05/22/how-to-troubleshoot-javascript-errors/

M
msalim author 6/27/2014



Check for Javascripts errors if any. Here is the article that can help:

http://xlinesoft.com...ascript-errors/


Thanks - got the issue resolved. The script on the add page was ok, but on the edit page there were some incomplete lines of code, and that was stopping the javascripts to work. But the funny thing is that it stopped all javascripts from working on all the pages - List, Add & Edit pages.