Solved

Adding Form input to a HREF'd query string?

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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 …

760 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

16 Experts available now in Live!

Get 1:1 Help Now