PDA

View Full Version : Parsing a Query String to a Form Field?


MarkEvans
06-15-2001, 03:44 PM
Can anyone help with this?

I want a form field to be updated with a 'Query String'

e.g.

LINK:
http://www.website.com/form.htm?subject=Enquiry+Two

The 'Query String' would print in the value= on submission...

<input type="hidden" name="subject" value="Query String">

Dr. Web
06-15-2001, 08:56 PM
you want a query string.... as in something from a database call?

I do it in coldfusion server, but there are other ways. What server side are you using? If you have the value on the page, you can use JS to do it:
document.form name.form element name.value=querystring

MarkEvans
06-17-2001, 05:17 AM
I've found a simple way to do this with ASP...

e.g.

LINK:
http://www.website.com/exmaple.asp?Holiday=Hello

The example.asp page would print out "HELLO" using this code...

<p><%=Request.Querystring("Holiday")%></p>