Open Dd Menu Selection In New Window July 24, 2024 Post a Comment I'm using the following code for a drop down menu but I want the selected option to open in a new window. How should I change this code to make this work? Solution 1: see below...index.html<html><body><formname="blah_blah"><selectname="ddmenu_name"id="ddmenu_name"style="width: 80% !important;"><optionvalue="first_option_name"selected>option display name</option><optionvalue="page1.html">1st option name</option><optionvalue="page2.html">2nd option name</option></select><inputtype="button"name="Submit"value="Go!"onClick="window.open(ddmenu_name.value,'newtab')"></form></body></html>Copypage1.html <html> <body> Page 1 </body> </html> Copypage2.html<html> <body> Page 2 </body> </html> CopyHope this is what you needed!!!Baca JugaHow To Check If An Html5 Validation Was Triggered Using Selenium?Jquery Datepicker Getting Displayed At The Bottom Of The Page (keith-wood Datepicker)How To Ignore Shortcode On Html Text SearchGood Luck!!!Update 1If you want to open new window quickly after selecting option (and not pressing Go button), below is code <html><body><formname="blah_blah"><selectname="ddmenu_name"id="ddmenu_name"style="width: 80% !important;"onChange="window.open(ddmenu_name.value,'newtab'"><optionvalue="first_option_name"selected>option display name</option><optionvalue="page1.html">1st option name</option><optionvalue="page2.html">2nd option name</option></select></form></body></html>Copy Share You may like these postsUsing Cm/mm On The CSS Of A Web App That Replicates Paper Interaction Is A Good Practice?What Is The Best "practice" Or Form Of Code In Javascript (example)How To Grab The Values From An HTML Table's Cells Using JavaScriptExtracting "hidden" HTML With Jsoup Post a Comment for "Open Dd Menu Selection In New Window"
Post a Comment for "Open Dd Menu Selection In New Window"