I need a function that enters the current date into a textbox when the page loads, but as I hardly know how to implement javascript into html I need a little help with this.
I've found a few examples of getting the date at a few sites, but no example of how to insert this date into a text box when the page loads...
<script LANGUAGE="JavaScript">
<!--
showDate()
{
var currentDate = new Date();
return currentDate;
}
-->
</script>
So from my html, I have this in there...
<input name="E_CreationDate" size="10" value="showDate()">
but all this does is place "showDate()" in the textbox.
What am I missing here? Is this function gonna work? Am I trying to call the function incorrectly?
Thanks for the help
I've found a few examples of getting the date at a few sites, but no example of how to insert this date into a text box when the page loads...
<script LANGUAGE="JavaScript">
<!--
showDate()
{
var currentDate = new Date();
return currentDate;
}
-->
</script>
So from my html, I have this in there...
<input name="E_CreationDate" size="10" value="showDate()">
but all this does is place "showDate()" in the textbox.
What am I missing here? Is this function gonna work? Am I trying to call the function incorrectly?
Thanks for the help