Passing form values in URL

Okay, I figured it out.

What I needed was something to handle the url query-- the browser alone won’t do it. Mailto links can repopulate a new email, so I probably just assumed it all worked that way. So, javascript to the rescue.

I started patching together a script which examines the url for a query string, finds the expected form and fields, translates the query string and inserts the data into the appropriate form fields.

So my link from the product page to the contact page:

http://myproof.thebigerns.com/inmark-contact-form/index.html?itemref=3688&itemname=Sullair%20375HH-200psi

automatically pre-fills part of the form as I needed. The script is linked to in the document head and then triggered by an onload command on the body element.


offtopic mailing list
email@hidden
Update your subscriptions at: