C
Chris
I'm trying to enter a date in a hidden field in a form. Below is the
code that appears in between <form></form>. I think the problem is
the document.write but am not sure. How should I be writing this part
of the code. Thanks, Chris
<SCRIPT LANGUAGE="text/javascript">
<!--
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
document.write(<input type="hidden" name="date2" value="curr_year +
"-" + curr_month + "-" + curr_date">);
//-->
</SCRIPT>
code that appears in between <form></form>. I think the problem is
the document.write but am not sure. How should I be writing this part
of the code. Thanks, Chris
<SCRIPT LANGUAGE="text/javascript">
<!--
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
document.write(<input type="hidden" name="date2" value="curr_year +
"-" + curr_month + "-" + curr_date">);
//-->
</SCRIPT>