MyBB Community Forums

Full Version: how to make a Popup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok hey 1

umm i'm planning to add to the bottom panel in the main page of the forum a link that open a popup.

my problem isn't in the template, but it's that , the pop up script isn't working with me

i'm using <a href="javascriptopup('test.htm')" width="360" height="215">Test</a>

thx in advance
Shoulden't that be -> <a href="javascriptpopup('test.htm')" width="360" height="215">Test</a>
If you just want a new window, try this:
<a href="test.htm" target="_blank">Test</a>

If you want to control the size of the popup, use this instead:
<a href="javascript:window.open('test.htm', 'tinyWindow', 'toolbar,width=150,height=100')">Test</a>
(Delete the space in the middle of java script in the code above)
thx guys, but i used something else

in head :

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=170,height=360,left = 429.5,top = 204');");
}
// End -->

in body:

<A HREF="javascript:popUp('links.htm')">links</A>


Smile