Retrieving Documents |
Retrieving Documents |
hankins27 |
Nov 11 2010, 04:11 PM
Post
#1
|
Group: Members Posts: 2 Joined: 11-November 10 Member No.: 13,121 |
Please excuse if this is posting in the wrong area...
I'm looking for some advice on presenting the users with a drop-down list, allowing them to only choose one item, and then retrieving a pdf document based on their selection. The documents are stored on the web server. This works fine for me (on a mac), unfortunately for most of the users (pc) it does not work. Regardless of what they select, it pulls up the document for the first item on the list. Any help is greatly appreciated!!!! ****Here is the code***** <form name="newsletterselect" action="xfer.php" method="GET"><div align="center"> <span class="style2">Select a newsletter from the drop-down list ... <select name="xfer" size="1" onmouseup= "location = '' + this.options[this.selectedIndex ].value;"> <option value="Newsletters/alabama.pdf">Alabama</option> <option value="Newsletters/alaska.pdf">Alaska</option> <option value="Newsletters/arkansas.pdf">arkansas</option> . . (you get what the rest of the options look like) . <option value="Newsletters/wyoming.pdf">wyoming</option> </select> </span> <noscript><input type="submit" value="Go!" /></noscript> </div> </form> |
pandy |
Nov 11 2010, 07:17 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
Use onchange instead of onmouseup. Also, what's the purpose of the empty quote in the beginning of the location value?
CODE location = '' + this.options[this.selectedIndex ].value; If I don't miss something, this should be enough. CODE location = this.options[this.selectedIndex].value; BTW JavaScript is all about browsers, not OS. |
hankins27 |
Nov 15 2010, 04:48 PM
Post
#3
|
Group: Members Posts: 2 Joined: 11-November 10 Member No.: 13,121 |
Thanks so much for your help!!!! That does seem to have solved the problem. THANKS!!!
|
pandy |
Nov 15 2010, 07:47 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
You are welcome.
|
Lo-Fi Version | Time is now: 28th April 2024 - 01:02 AM |