Connecting Tech Pros Worldwide Forums | Help | Site Map

Refresh page after selecting dropdown

Familiar Sight
 
Join Date: Jan 2008
Posts: 199
#1: Mar 26 '08
I have a dropdown box and what i want to do is refresh the page when i select one of the options, but i need to keep that variable that i chose as it effects my sql statements.

harshmaul's Avatar
Expert
 
Join Date: Jul 2007
Posts: 483
#2: Mar 26 '08

re: Refresh page after selecting dropdown


Try this script (BTW i think this was a question more suited for the Javascript forums

[HTML]<html>
<head>
<title>select test</title>
</head>
<body>

<form name="FormName" action="export.html" method="GET">
<select name="mydropdown" OnChange="document.FormName.submit();">
<option value="Dell">Dell</option>
<option value="HP">HP</option>
<option value="Mac">Mac</option>
</select>
</form>
</body>
</html>[/HTML]
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#3: Mar 26 '08

re: Refresh page after selecting dropdown


Great! Alwayas wondered how to do that, and ur post is really simple! Cheers.
Reply