I want to add a link to a calculator for converting cooking measures in the postbit. This page is in the root folder (forum is in /forums folder). I need to add this code in the header:
PHP Code:
<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=0,menubar=0,resizable=0,width=275,height=750,left = 502.5,top = 137');");
}
// End -->
</script>
I did that in showtread, but it isn?t working. Where should I add it?
Thanks.
OK, so I got it working by following the instructions in this
thread:
Quote:
<script language="JavaScript">
function popup(url, window_name, window_width, window_height)
{ settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+window_width+",height="+win dow_height;
NewWindow=window.open(url,window_name,settings); }
</script>
|
Quote:
<a href="#"
onclick="popup('mynewpage.php', 'Window', 160, 200);">Newpage</a>
|
Now the problem is that the page is redirected to the homepage when I click on popup opens.