This topic is locked
[SOLVED]

 JavaScript Onload Event

8/18/2010 11:50:12 AM
ASPRunnerPro General questions
S
Scruffy author

I've looked through the forum and found something like what I need, based on the value in a dropdown box i want to hide/show a control, this works but the label still shows. Is there any way to hide the label too? TIA

var ctrl1 = Runner.getControl(pageid, 'Field1');

var ctrl2 = Runner.getControl(pageid, 'Field2');



ctrl1.on('change', function(e){

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

ctrl2.show();

}else{

ctrl2.hide();

}

});
A
ann 8/19/2010
S
Scruffy author 8/19/2010

Many thanks, I rarely look in the PHP forums but that link helped.