I had a working ASP.Net (VB.Net) website which utilized a javascript routine during StartUp.
It would do a document.getElementsByTagName("input"); to find all of the Input objects and then selectively work on their style values as initialization processing.
It all worked fine.

     var elemInputs = document.getElementsByTagName("input");
     for(var i = 0; i < (elemInputs.length-1); i++) 
        var inputField = elemInputs[i].name;
        if(inputField.indexOf('chkLot') == 0) {
        // --- processing code here... ---

Previously worked fine.

Now I have added Ajax to the mix with an UpdatePanel.
That alone made things a 'challenge' because my VB.Net: ScriptManager.RegisterClientScriptBlock() was no longer working to launch the intended code.

But, after much web searching, I finally got the right VB.Net code to launch the intended startup javascript routine.

ScriptManager.RegisterClientScriptBlock(TryCast(sender, Control), Me.GetType(), Guid.NewGuid().ToString(), "startUpScript()", True)

Setting breakpoints in Firebug enable me to confirm that the intended code is being executed.

But now my document.getElementsByTagName("input"); is no longer 'seeing' the various Input objects and therefore does not act upon their style.

When I look at elemInputs within FireBug, I no longer see it containing the variety of Input objects that I need to find.

What is going on?

How can I resolve this so that the Startup javascript 'sees' the form objects?

2 Years
Discussion Span
Last Post by Troy III

What is the HTML structure containing those inputs?
And what doc-type are you using?

Did you change any of the above-mentioned before this issue has arisen?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.