getting the value in javascript
-
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
-
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
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.
-
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.
-
u meanz. var lbl = document.getElementById(<%=title.ClientID>').value; but still not working
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.
-
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.
-
not at all actually its just typing mistake. in js.. var lbl = document.getElementById('<=title.ClientID>;').value; title is.. ;
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.