A
Anonymous
Guest
I am a novice and wonder how to show the selected country in the pull down menu in a new page after it is selected by the user. The following code does work where it redirects the user to the new page. The problem is, United States is always selected in this code. How do I make it flexible such that when the same code is run by the new page, that the selected country would show in the pull down box?
<code>
<form name="frmCountry" method="post">
<td align="right" valign="center">Select: 
<select name="redirCountry" style="font-family:Verdana;font-size:11px;width:130px;">
<option value="us" selected> United States</option>
<option value="us"> Australia</option>
<option value="es"> Argentina</option>
</select>
</td>
<td><a href="#" onClick="redir = document.frmCountry.redirCountry.options[document.frmCountry.redirCountry.selectedIndex].value; window.location = 'index.php?flag='+redir;"><img src="images/go.gif"></a></td>
</form>
</code>
I'd appreciate if you can show me the modification that can be made to this code to make it work.
<code>
<form name="frmCountry" method="post">
<td align="right" valign="center">Select: 
<select name="redirCountry" style="font-family:Verdana;font-size:11px;width:130px;">
<option value="us" selected> United States</option>
<option value="us"> Australia</option>
<option value="es"> Argentina</option>
</select>
</td>
<td><a href="#" onClick="redir = document.frmCountry.redirCountry.options[document.frmCountry.redirCountry.selectedIndex].value; window.location = 'index.php?flag='+redir;"><img src="images/go.gif"></a></td>
</form>
</code>
I'd appreciate if you can show me the modification that can be made to this code to make it work.