hidden value becomes null

M

meltedown

I have this on a web page

<input type='hidden' name ='military' value=1>

and this in a javascript function:
alert(document.form1.military.value);


The military value comes up null.

Is this normal, or did I do something wrong ?

thanks, meltedown
 
V

VK

meltedown said:
I have this on a web page

<input type='hidden' name ='military' value=1>

and this in a javascript function:
alert(document.form1.military.value);


The military value comes up null.

Is this normal, or did I do something wrong ?

It is not really normal. Could you post more complete code fragment? An
URL would be super.
 
M

meltedown

Randy said:
meltedown said the following on 6/1/2006 1:15 PM:

It is amazing what happens when people make test cases and they work.
Yeah, it turns out I had tested for NULL in the javascript and used =
instead of ==. Its those simple stupid mistakes that make me question my
understanding. It can't be doing that !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top