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
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