MyBB Community Forums

Full Version: open in a new window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I add a pulldown menu on the top of my forum.
Some of the links I want to open in the same window, but some of them I wanne have in a new window.
How does this work with this link.

<option value="http://www.ikf-forum.eu/blogs.php">MYBLOG</option>
Im pretty sure you can just do it the same way as you would with a link. Just add target="_blank" to it.
Just middle click on it (your scroll wheel).Toungue
That doesnt work with selection menus Toungue
Try it with the forum jump, it doesnt work.
Did't really think about it Toungue. Never need to open option menus in a new window.
This is only possible with Javascript.
Here is a nice tutorial: http://www.javascriptkit.com/jsref/select.shtml
Its allready a javascript

<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO" style="font-family: Arial Black; font-size: 7pt; color:#FFFFFF; background-color:#008080" size="1">
<option>EXTRA MENU</option>
<option value="http://www.ikf-forum.eu/vgallery.php">YOU TUBE&nbsp;&nbsp;</option>
<option target="_blank" value="http://server1.webkicks.de/kellychat/index.cgi">FORUM CHAT
</option>
<option value="http://www.ikf-forum.eu/addons/lyrics/">LYRICS</option>
<option value="http://www.ikf-forum.eu/blogs.php">MYBLOG</option>
<option value="http://www.ikf-forum.com/forumgallery/">PHOTO ALBUM</option>
</select></form>

Some of the links must open in the same window because they are working in mybb, but forum chat and photo album must open in a new window (because they do not have a mybb header.
Why don't you just use a CSS/JS drop down? Makes more sense imo and it's easier.
Because this one the most easiest:
- easy to intergrate in template for me
- easy to change for me
- only one small script
- no need to upload a secundairy file (js)
- works with every browser
Yes, but it can't seem to do what you want it to so you may have to switch.
Pages: 1 2