Solved

Adding Form input to a HREF'd query string?

Posted on 2000-02-21
4
134 Views
Last Modified: 2013-12-25
Hi guys......
I have a query string wrapped inside a href.......
<A HREF=CGIDOC?PARAM=Hello%2World>Click Me</A>

I have a popup on the same page.......
<SELECT NAME=POP1>
<OPTION>Fred
<OPTION>Barney
<OPTION>Wilma
</SELECT>

Without a submit button, how can I pass on the contents of the selection of the popup along with the query string?

regards
Ricky
0
Comment
Question by:rickyr
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
jhurst earned 50 total points
ID: 2543858
In Javascript you can determnine that the value in the menu has changed using onChange.  Then this can update th value of the link so that when the user touches the link it has been changed.

Probably a better choice would be to make the href actually do a call to a JS function and have the JS function do the reference.
0
 
LVL 3

Author Comment

by:rickyr
ID: 2568774
Fire away j, and the points are yours.
0
 
LVL 8

Expert Comment

by:jhurst
ID: 2570434
<html>
<body>
<a href=Javascript:document.theForm.submit()>
Touch Here
</a>

<form name=theForm action=http://www.REsource.nu/cgi-bin/env.cgi>
<select name=pop1>
<option value=Fred>Fred
<option value=Barney>Barney
<option value=Wilma>Wilma
</select>
</form>
</body>
</html>
0
 
LVL 8

Expert Comment

by:jhurst
ID: 2570441
PS = note I use the onClick to actually cause the form to be submitted.  Also, I submitted to our env.cgi so that we could all check what is really happening.  
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now