View Single Post
Old 07-10-2002, 12:21 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,705
redhead is on a distinguished road
Set the <form> action to be get instead of post
That will parse all your field values into the HREF url, instead of sending them hidden.

Or if you have something else in mind, the $field_name in PHP will allways hold the value of the given field, no matter if its hidden or displayed.

Else if its JavaScript, you just need to:
Code:
document.form_name.field_name.value = "what ever you want";
that'll set the value of any field, no matter if it's hidden or wahtever.
In order to get some info from the HREF, you can make some parsing of the document.href and split it up, with the use of document.href.indexOf("some_field_name=") and then search for the next & or end of url line. and that'll be the value assigned to that field hidden in the HREF.
Altho its URL-encoded it'll be quite easy to convert back.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote