Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent information being sent on a form

Status
Not open for further replies.

Killborg

Technical User
Jul 16, 2007
46
US
Hello
I have a hidden I use on a form. But when I submit the form the information in the hidden field is sent. How do I prevent the information being sent. What do I need to change and where do I change it.

Here is the hidden field.

<input name="thelength" type="hidden" id="thelength" value="7" /></td>
 
Put the hidden value outside the form being submitted.

That's hardly a Javascript question, though.

Lee
 
I would say set the disabled attribute to true.
<input name="thelength" type="hidden" id="thelength" value="7" />
[tt]<input name="thelength" type="hidden" id="thelength" value="7" disabled="disabled" />[/tt]
If by js function, add this line.
[tt]document.[green]yourformname[/green].thelength.disabled=true;[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top