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

drop down menu onChange submit possibilites?

Status
Not open for further replies.

Ewan

MIS
Mar 21, 2001
5
US
I am using a piece of javascript which changes the page it's in according to what selection is made from a drop down menu.

all is fine, but i'd like it so that all the information that was in all the fields to still be there after it has changed.

i modified the script to create a url for the browser to point to, the thing is certain characters(' # ") trip up the broweser, and also IE doesn't like it if there is too much text in some fields.

What i'm trying to do is execute a form submission using the drop down menu, so that the informtaion in the form is carried over to the new version of itself.

another complication is that i need the value of the drop down menu for another form, and have been unable to embed one form within another - is this just not possible?

i hope that's clear enough

any help would be very much appreciated.

thank you

Ewan Gibb
 
Cookies? It's an option i was hoping could be avoided. I'll look into it tho' cheers :)

Ewan
 
if you don't use cookies you'll have to carry the parameters on every page (either in hidden fields or in the url params)
or maybe you could use a frame that remains static for the drop down ??
 
How would i pass the values to the next page using hidden fields with the drop down as the "submitter"?

cheers
 
if the drop down is the submitter then you have its value and don't need no hidden field !! i think i didn't understand EXACTLY what your problem was :-(

anyway if you want to fill a hidden field before submitting, it's not very elegant but you can do it in the validation function (the one that is called with the onsubmit)

function validate () {
if (everything_is_fine) {
the_form.the_hidden_field.value=any_value
return true
}
return false
}

(this can be used for filling a hidden field in a hidden frame tho : you can change everything everywhere, until you leave the hidden frame untouched the values remain accessibles)
 
Cheers everyone. I've found a neat way of doing it all with cookies. thank you again.

Ewan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top