| | |
converting drop down menu into a search field
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2007
Posts: 15
Reputation:
Solved Threads: 0
I have this code, I know it has ASP in it but the ASP isnt giving me the hard time, the javascript is (I think...). Right now users can use this drop down menu to get to a certain page, but instead i need to have them type in a number and then have it go to that page in a new window (as they are PDF files) and if not, display an error. Right now I have
And that works fine, but Ive tried countless different things and nothing seems to give me the desired result. any thoughts?
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<select name="catalogPage" > <%for i = 1 to 396%> <option value="<%=i%>.pdf"><%=i%></option> <%next%> </select>
And that works fine, but Ive tried countless different things and nothing seems to give me the desired result. any thoughts?
Incorporate this event handler with your select element...
html Syntax (Toggle Plain Text)
onfocus="javascript:try{loc=parseInt(prompt('Please enter a number not more than (your initial value).')); this.selectedIndex=(loc-1); window.open(this.options[this.selectedIndex].value,target='_blank','');}catch(e){alert('Some error(s)!')};"
Last edited by essential; Feb 12th, 2009 at 9:42 am.
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript not working right on FIREFOX!
- Next Thread: Can't paste in a <span> in Firefox
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets api autoplay blackjack browser bug captchaformproblem checkbox child class close codes cookies createrange() cursor date debugger dependent developer disablefirebug dom dropdown editor element embed engine events explorer ext file flash form forms game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images internet java javascript javascripthelp2020 jquery jsf jsfile jump libcurl maps math matrixcaptcha media mp3 mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming progressbar rated runtime safari scriptlets scroll search security session shopping size software star stars stretch synchronous tweet unicode variables web webkit webservice window wysiwyg \n





