This topic is locked

java script onload example plzzzzzzzzz

1/17/2011 11:34:42 AM
PHPRunner General questions
author

hi
im new to php runner
i need a java onload event for
selecting a list box value to disabling a another list box
for a exmple

i have drop down list with values CR,DR ,
if Cr selected i want disable the bank names drop downlist how do i do this.
plz help me to d this with sample code

E
ericholiveira 1/17/2011

In Help Phprunner this code

var ctrlCountry = Runner.getControl(pageid, 'country');

var ctrlState = Runner.getControl(pageid, 'state');
ctrlCountry.on('change', function(e){

if (this.getValue() == 'US'){

ctrlState.show();

}else{

ctrlState.hide();

}

});
romaldus 1/17/2011



hi
im new to php runner
i need a java onload event for
selecting a list box value to disabling a another list box
for a exmple

i have drop down list with values CR,DR ,
if Cr selected i want disable the bank names drop downlist how do i do this.
plz help me to d this with sample code


Very easy :



var ctrlDropdown1 = Runner.getControl(pageid, 'DROPDOWN1');

var ctrlBank = Runner.getControl(pageid, 'BANK');
ctrlDropdown1.on('change', function(e)

{

if (this.getValue() == 'CR')

{ctrlBank.setEnabled();}

else

{ctrlBank.setDisabled();}

});