When the page loads, it first hits the alert statement in the head section. At that point, the rest of the page hasn't loaded, so document.abcd doesn't exist yet.
Move your alert to the onload of the page that fires *after* the page has completed loading. You also need to wrap your control in a <form> tag and then reference it by its name:
<body onload="alert(document.frmTest.abcd.value);">
<form name="frmTest">
<input type="hidden" name="abcd" value="11">
</form>
</body>
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Reverence by
Faithless (Track 1 from the album:
Reverence)
What's This?