Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. document.getElementById("") javascript ASP.NET.

document.getElementById("") javascript ASP.NET.

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-net
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pranav Thakur
    wrote on last edited by
    #1

    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.

    V A 2 Replies Last reply
    0
    • P Pranav Thakur

      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.

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • P Pranav Thakur

        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.

        A Offline
        A Offline
        Ashik Wani
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • A Ashik Wani

          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

          P Offline
          P Offline
          Pranav Thakur
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups