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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Value of Text Field

Status
Not open for further replies.

FateFirst

Programmer
Apr 15, 2002
212
GB
Hi,

really simple (im guessing :p )

Just want to set the value of a hidden text field to be what I set it to be on the 'onclick' of a button and then submit the form

1 form
1 hidden field
4 buttons.

Each button will pass through a different value to the hidden field and then submit the form.

Each time i tried it just didnt do anything...but then didnt report an error either.

- FateFirst
 
>>Each button will pass through a different value to the hidden field and then submit the form.

an input of type "button" will NOT submit the form by default, use a "Submit" type input...

Known is handfull, Unknown is worldfull
 
cant you just use onclick="document.form.submit();" for a button?

but i want to pass through some data before it submits the form.

- FateFirst
 
document.form.submit(); and onSubmit event of forms cannot be used together. if document.form.submit() is used the onSubmit() method is IGNORED...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top