Solved

Adding Form input to a HREF'd query string?

Posted on 2000-02-21
4
135 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

816 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

11 Experts available now in Live!

Get 1:1 Help Now