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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list menu and zip files

Status
Not open for further replies.

idaryl

Technical User
Nov 10, 2001
156
US
Hello all,

my client has about 25 zipped pdf files that are date ordered and they want the user to select from the drop down list a date, (I've only shown three) then the appropriate file will be opened or downloaded.. shown is what I have so far - however I'm sure there is something I've left out - [naturally] - I'm no java guy by any means ;-(

So, any help would be appreciated.
Code:
<form name="pdfs" method="post" action="">
<select name="select" class="BodyText">
<option value="../pdfs/001.zip">Fall/Winter 2003</option>
<option value="../pdfs/002.zip">February 2003</option>
<option value="../pdfs/003.zip">September 2003</option>
</select>
</form>

idaryl
idface.gif
 
let's try this,
Code:
<script>
var path="../pdfs/001.zip";

function go(uSelect){
path=uSelect;
}

function download(){
window.open(path);
}
</script>

<form name="pdfs" onSubmit="download();">
<select name="select" class="BodyText" 
onChange="go(this.options[this.selectedIndex].value);">
<option value="../pdfs/001.zip">Fall/Winter 2003</option>
<option value="../pdfs/002.zip">February 2003</option>
<option value="../pdfs/003.zip">September 2003</option>
</select>
<input type=submit value="Download">
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top