PDA

View Full Version : Validate textbox value created at runtime


ponmurugan30
05-28-2010, 10:27 AM
I create a textbox which is created at runtime from vb dll and sent to the asp page. I am unable to validate the value entered in the textbox.See the sample code below which will be invoked in keypress event


var objInput = event.srcElement;

If ( window.event.srcElement.id == "OUT_OF_STATE_1" ) {


}

When the page is loaded error is thrown at that time itself, however I able to display the value. see the example below.

alert (window.event.srcElement.id );

The value OUT_OF_STATE_1 is displayed.