Dropdown Box with d/load button

liunx

Guest
How do people do those boxes (like a combo box in VB, i think they're called list/menu boxes in dreamweaver) ?<br />
<br />
I've seen them before used for navigation.<br />
<br />
What i need is a few items in the drop down list, with a Download <!--more--> button, and when the user clicks on the button it will Download <!--more--> the file thats selected in the dropdown box. <br />
:confused: <br />
<br />
Cheers<br />
<br />
ps i just realised the exact thing i want is at the bottom of this forum - jump to a forum page, but how can i Download <!--more--> the selected item?<!--content-->Try something like this:<br />
<br />
<form><br />
<select name="Download <!--more-->"><br />
<option value="http://www.yoursite.com/file1.zip">File 1</option><br />
<option value="http://www.yoursite.com/file2.zip">File 2</option><br />
</select><br />
<input type="button" value="Download <!--more-->" onclick="window.location.href=http://www.webdeveloper.com/forum/archive/index.php/this.form.Download <!--more-->.options[this.form.Download <!--more-->.selectedIndex].value;"><br />
</form><!--content-->wow thanks for the quick reply pyro, that works great<br />
<br />
<br />
:D<!--content-->You're welcome... :)<!--content-->sorry for brushing the cobwebs off this one, but i just found an error that i never realised before :eek: <br />
<br />
i made it like this:<br />
<br />
<Select name = "Download <!--more-->"><br />
<option>Previous Issues</option><br />
<option value = Download <!--more-->s/Issue1>Issue 1</option><br />
<option value = Download <!--more-->s/Issue2>Issue 2</option><br />
<option value = Download <!--more-->s/Issue3>Issue 3</option><br />
</select><br />
<br />
Then the code pyro gave me:<br />
<br />
<input type = "button" value = "Download <!--more-->" onclick = "window.location.href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/this.form.Download">http://www.webdeveloper.com/forum/archi ... m.Download</a><!-- m --> <!--more-->.options[this.form.Download <!--more-->.selectedIndex].value;"><br />
<br />
If I keep it on the default option, Previous Issues, and click Download <!--more-->, i get an error/ debug message. Is there any way to avoid this?<br />
<br />
thanks<!--content-->Try this:<br />
<br />
<select name="Download <!--more-->"> <br />
<option value="javascript:void(0)">Previous Issues</option> <br />
<option value="Download <!--more-->s/Issue1">Issue 1</option> <br />
<option value="Download <!--more-->s/Issue2">Issue 2</option> <br />
<option value="Download <!--more-->s/Issue3">Issue 3</option> <br />
</select>with no space in javascript...<!--content-->thats works a treat<br />
<br />
thanks pyro <br />
<br />
:D<!--content-->You bet... :)<!--content-->
 
Back
Top