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

Access Variable Object required 1

Status
Not open for further replies.

pingit

MIS
Nov 24, 2003
37
NZ
Hello All

I am building a webpage using asp. The code puts a text box named ASSdate on the page then a button which launches a date picker to set the ASSdate value.

Problem is when I go to access the value from JS I get the error "Object required"

Here is the asp code:
response.Write("<td valign=top align=left > Date of Assessment:<br><input type=""text"" name=""ASSdate"" id=""ASSdate"" /><input type=""button"" id=""ASSCALButton"" value=""Pick"" /><br> Date of Report:<br> <input type=""text"" name=""REPdate"" id=""REPdate"" /><input type=""button"" id=""REPCALButton"" value=""Pick"" /> </td>")

Here is the javascript code:
var AssD;
AssD = document.getElementById(ASSdate).value;
Alert(AssD);

Any help much appreciated

Thanks in advance
 
[tt]AssD = document.getElementById([red]"[/red]ASSdate[red]"[/red]).value;[/tt]
 
Hello tsuji

Yep that did it

thanks very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top