Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[HTML] Need to combine on-click drop down and check boxes

Status
Not open for further replies.

HowdeeDoodee

Technical User
Mar 14, 2005
61
US
I need to combine the input from checkboxes with a hyperlink embedded in an on-click drop down box. At the present time I do not have any checkboxes in my htlm drop down code. This means the user only goes to the following link based upon what is in the link below. However, I do not want this.


Code:
<select name="values" onChange="if(this.options[this.selectedIndex].value) window.location.href=this.options[this.selectedIndex].value;"> 
<option>FIND TOPICS STARTING WITH "A"</option>
<option value="[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?TY=ON&TE=ON&SeeTopic=A">A</option>[/URL]
</select>

When a user clicks on the above drop down the user is taken to the following page:

Code:
[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?TY=ON&TE=ON&SeeTopic=A[/URL]

What I want to do is make check boxes available so a user can choose between TY and TE and have the TY=ON or the TE=ON added on to or appended to the following hyperlink

Code:
[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?SeeTopic=A[/URL]

Therefore, I want the user to be able to click on the TY checkbox, the user will hit the drop down entry and get sent to the following page with the TY checkbox checked.

Code:
[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?SeeTopic=A&TY=ON[/URL]

Or, if the user clicks on the TE checkbox, the user will be sent to the following page.

Code:
[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?SeeTopic=A&TE=ON[/URL]

Or, if the user clicks on both the TE checkbox and the TY checkbox, the user will be sent to the following page.

Code:
[URL unfurl="true"]http://www.websiteaddress.com/XC/FindTopic.php?SeeTopic=A&TE=ON&TY=ON[/URL]

Thank you in advance for any replies.

Edited to show code rather than html links
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top