html - <select> Popup Windows -
ok have been searching find of similar having no luck..
i want know how can code pop in new window , resized? example: window 250px 250px, no border, no address bar.. compact window.
this have found, not sure how work...
<form action="../"> <select id="select-box" class="select" name="selectbox" size="6"> <option value="folder1/list_1.html">1</option> <option value="folder2/list_2.html">2</option> <option value="folder3/list_3.html">3</option> <option value="folder4/list_4.html">4</option> <option value="folder5/list_5.html">5</option> </select> <input type="submit" value="open page" onclick="ob=this.form.selectbox;window.open(ob.options[ob.selectedindex].value)"> </form>
what know is, data entered in "action" incorrect.. don't know how can make read specific folders etc... know if remove "action" loads pages new tabs. doesn't load them new window.. know nothing this, been playing around , reading tuts, if can me, appreciated.. thanks.
if want open in popup window need use "_blank"
in window.open()
. can use other attributes change size of window. also, there limited things window can remove. window.open()
html
<form onsubmit="return false;"> <select id="select-box" class="select" name="selectbox" size="6"> <option value="folder1/list_1.html">1</option> <option value="folder2/list_2.html">2</option> <option value="folder3/list_3.html">3</option> <option value="folder4/list_4.html">4</option> <option value="folder5/list_5.html">5</option> </select> <button onclick="popup(this.form.selectbox);">open page</button> </form>
javascript
function popup(ob) { if (ob.selectedindex < 0) return false; window.open(ob.options[ob.selectedindex].value, "_blank", "height=200,width=200,menubar=no,status=no,titlebar=no,toolbar=no"); }
Comments
Post a Comment