Click to See Complete Forum and Search --> : Last minute post values


Geat
02-07-2003, 07:12 AM
Right, I'm submitting a series of values from a form via the post method. Is there a way that I can add an extra variable and value into the list from the onclick() method of the submit button?

Basically, I've got a hidden input that's set at the current page's ID so that when the user selects options the PHP reloads the page in various states.

However, when the user clicks "submit", I wish this value to point to the next page, not the current one.

I appreciate that I could get a hold of the hidden input and change the value, but I'd like to do it (for simplicity) another way...

khalidali63
02-07-2003, 07:17 AM
It seems like you want to chagne the hidden inputs value when a user clicks on submit button?
document.formName.fieldName.value = "whatever new value you want"

I have a feeling that you already know that..

Khalid

Geat
02-07-2003, 07:18 AM
Yeah, that's my last resort. It would be nice if there was a clean way of sticking the value in the parameters another way...

khalidali63
02-07-2003, 07:35 AM
I don't understand what is a "clean way" for you,but I think you have get value from the input either before its popluated or after to make changes to it.

khalid

Geat
02-07-2003, 07:42 AM
I like low-level nitty-gritty, you know, actually grab the values just before they leave the page and change them there, as opposed to before they are submitted for posting.

But I'll use your way...