Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the contents of a label 1

Status
Not open for further replies.

seabaz2000

IS-IT--Management
Feb 24, 2006
79
IE
Hi
I am trying to get the contents of a label in javascript.

Below I am trying to pass back in an end date through a url querystring. The end date is contained as text in the label below. When I try to do it this way all I get is an object and not the actual value inside the label.
Code:
&enddate='+ctl00_ContentPlaceHolder1_WebPartManager1_ProcessDataProvider_LabelEnd
Regards
 
Do you mean "label" (as in an HTML <label> element), or do you mean JS variable?

What you've shown is simply a JS variable - not a label at all.

If you really maan a label, give it an ID:

Code:
<label id="wibble">The text inside the label</label>

and then use this:

Code:
var someStr = '&enddate=' + document.getElementById('wibble').innerHTML;

if you do not mean a label, perhaps you can explain what you really mean?

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top