View Full Version : select and go menu probs

06-17-2008, 05:08 PM
I hope I am posting in the right place, if not my apologies.

Gotta simple select and go script working fine, but I want to offer similar functionality for visitors without javascript.

<onload= "document.myForm.newLocation.selectedIndex=0">
<div align="center">
<form action="gotoLocation.cgi" name="myForm">
<select name="newLocation" onchange="jumpPage(this)">
<option selected="selected">
Select your State</option>
<option value="index.php/CPT/Online-Certification/Approved.html">
<option value="index.php/CPT/Online-Certification/Sorry.html">

<input type="submit" value="Find Out!" />

This almost works, as when I test with javascript disabled, a submit button is created ("Find Out!") and the visitor is sent to a new url.

Unfortunately, the new url is not the same as the url indicated in the code,

should look like this:


but ends up looking like this:


I just need to figure out how to remove the extra words/symbols from the urls.

You can see it in action at http://certifiedpooltechnician.com

There are two pull downs on the page, both the same code.

Thank you in advance for your assistance!

rnd me
06-17-2008, 10:12 PM
can you post the source for the function jumpPage() ?

without javascript, the browser will redirect to the action url of the form tag, so that's a php question.
you will need to transfer or forward the session in a script at that url, based upon the querystring.

06-18-2008, 01:56 PM
Thanks for taking the time to help, rnd me.

Is the following what u mean?

<script language="Javascript" type="text/javascript">
<!-- Hide script from older browsers
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
if (newPage != ""){
window.location = newPage

I think the prob is that I don't have a cgi script loaded on my server, but I don't know exactly what I need or where to put it.

Thanks again for any help. I am new to this so I really apprecitate your patience.

06-18-2008, 02:18 PM
but ends up looking like this:

You can see it in action at http://certifiedpooltechnician.com

When I select Alabama, I reach at http://certifiedpooltechnician.com/index.php/CPT/Online-Certification/Approved.html, and see "Approved" message. The url is also fine.