Link to home
Start Free TrialLog in
Avatar of Galagos1

asked on 4 to javascript

How do you read in a value from a text box in javascript.  I am not using a form.
var dateValue = new Date();
dateValue = this.document.getElementById("txtDate1").value;
reading it from this text box.
I get this error when I run it
Microsoft JScript runtime error: Object required
Avatar of Rahul Agarwal
Rahul Agarwal
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think, agarwalrahul meant to use

dateValue = document.getElementById('<%=txtDate1.ClientID%>').value