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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems using innerText 1

Status
Not open for further replies.

seabaz2000

IS-IT--Management
Joined
Feb 24, 2006
Messages
79
Location
IE
Hi
I am attempting to use the innerText function to place a value in a certain label on my website.
Here is the code:
Code:
<script language="javascript" src="calendarDateInput.js"> </script>
<script>DateInput('orderdate', true, 'DD-MON-YYYY')</script><input type="button" onClick="ctl00_ContentPlaceHolder1_WebPartManager1_ProcessDataProvider_LabelStart.innerText='(this.form.orderdate.value)'" value="Select";>
What is happening is that the text "this.form.orderdate.value" is being outputted by the label instead of the value for the date.
Regards
 
1. "innerText" is IE-only, NOT cross-browswer, so use something like ".innerHTML instead.

2. Remove the ' around the text you are setting.

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