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. getting the value in javascript

getting the value in javascript

Scheduled Pinned Locked Moved ASP.NET
javascripthelp
6 Posts 2 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.
  • R Offline
    R Offline
    RajaAhmed
    wrote on last edited by
    #1

    m looking to get the value of label or hidden input field in javascript .... var lbl = document.getElementById(Label1); . . so.addParam('flashvars', 'file=' + lbl.value + '&type=video'); . . > where Label1 is or but i m not geeting it right any help......... thanks in advance

    C 1 Reply Last reply
    0
    • R RajaAhmed

      m looking to get the value of label or hidden input field in javascript .... var lbl = document.getElementById(Label1); . . so.addParam('flashvars', 'file=' + lbl.value + '&type=video'); . . > where Label1 is or but i m not geeting it right any help......... thanks in advance

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You need to use the ClientID property of Label1 to find out what it's called on the client

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      R 1 Reply Last reply
      0
      • C Christian Graus

        You need to use the ClientID property of Label1 to find out what it's called on the client

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        R Offline
        R Offline
        RajaAhmed
        wrote on last edited by
        #3

        u meanz. var lbl = document.getElementById(<%=title.ClientID>').value; but still not working

        C 1 Reply Last reply
        0
        • R RajaAhmed

          u meanz. var lbl = document.getElementById(<%=title.ClientID>').value; but still not working

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Well, that's because you have not put the id in quotes. When you move beyond making the sort of basic mistakes that are clear to anyone with half a clue, you will find it hard to get answers if you don't move past 'still not working', to actually explain any error messages, what you did about those messages, and why you're still stuck.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          R 1 Reply Last reply
          0
          • C Christian Graus

            Well, that's because you have not put the id in quotes. When you move beyond making the sort of basic mistakes that are clear to anyone with half a clue, you will find it hard to get answers if you don't move past 'still not working', to actually explain any error messages, what you did about those messages, and why you're still stuck.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            R Offline
            R Offline
            RajaAhmed
            wrote on last edited by
            #5

            not at all actually its just typing mistake. in js.. var lbl = document.getElementById('<=title.ClientID>;').value; title is.. ;

            C 1 Reply Last reply
            0
            • R RajaAhmed

              not at all actually its just typing mistake. in js.. var lbl = document.getElementById('<=title.ClientID>;').value; title is.. ;

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              AhmedNisar82 wrote:

              var lbl = document.getElementById('<=title.ClientID>;').value;

              This won't work, just < and > does not make a server side tag. You need to put a % inside either side for that to work. Have you checked the HTML to see what comes out ?

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              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