document.getElementById("") javascript ASP.NET.
-
Hi, I want to getElementById of a control which is inside a Wizard control in ASP.NET 2.0. My code is like : var ddl=document.getElementById("ddlCountry"); if my ddlCountry is inside a Wizard control then how I will get the control by getElementById("").The above code works fine if ddlCountry is not inside wizard control.If it is inside wizard control then the above code does not work.
-
Hi, I want to getElementById of a control which is inside a Wizard control in ASP.NET 2.0. My code is like : var ddl=document.getElementById("ddlCountry"); if my ddlCountry is inside a Wizard control then how I will get the control by getElementById("").The above code works fine if ddlCountry is not inside wizard control.If it is inside wizard control then the above code does not work.
Check out this discussion http://forums.asp.net/t/1253179.aspx[^], which does disabling of Next Button in the Wizard Control. You can try using a similar trick.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare -
Hi, I want to getElementById of a control which is inside a Wizard control in ASP.NET 2.0. My code is like : var ddl=document.getElementById("ddlCountry"); if my ddlCountry is inside a Wizard control then how I will get the control by getElementById("").The above code works fine if ddlCountry is not inside wizard control.If it is inside wizard control then the above code does not work.
Hi, Get the ClientID property of ddlCountry from the server side code. If your get 'ctl00_BodyContent_Wizard1_ddlCountry' then the following line will give you control refrence in javascript. var ddl=document.getElementById('ctl00_BodyContent_Wizard1_ddlCountry'); Shout if you still get problem, Cheers, :) Ashik
-
Hi, Get the ClientID property of ddlCountry from the server side code. If your get 'ctl00_BodyContent_Wizard1_ddlCountry' then the following line will give you control refrence in javascript. var ddl=document.getElementById('ctl00_BodyContent_Wizard1_ddlCountry'); Shout if you still get problem, Cheers, :) Ashik
i declared a global variable like this: string ddl=""; then in page load i wrote the following line: ddl = ddlCountry.ClientID; now in javascript i write like : var DrpDwn = document.getElementById("ddl"); alert(DrpDwn). Above is code is not working.What is wrong I am doing.Remember ddlCountry is inside wizard control.