[thelist] Simple JS question.
Marcus Andersson
marcus at bristav.se
Tue Nov 30 09:04:13 CST 2004
My guess is that the browser will complain that document.TUWTCY.when_date doesn't exist since it tries to
execute it before the page is rendered.
You have to do:
window.onload = function() {
document.TUWTCY.when_date.value = "";
}
or possibly create a function that is called on body.init.
And the value won't be null, it will be the empty string value.
/Marcus
Christian Kavanagh wrote:
> Hola list!
>
> Will this bit of JavaScript set the "when_date" field in the "TUWTCY"
> form to null when the page is loaded?
>
> <SCRIPT language="JavaScript">
> document.TUWTCY.when_date.value = "" ;
> </SCRIPT>
>
> Many thanks.
>
> Your friendly JavaScript noob,
> Chris.
>
More information about the thelist
mailing list