Author |
Message |
gstrategic
Hangin' Around
Joined: Aug 15, 2005
Posts: 46
|
Posted:
Thu Sep 08, 2005 8:42 pm |
|
Quote: |
window.open('http://www.vancouverbiz.net', 'popup', 'width=200, height=200, top=7, left=7, menubar=0, scrollbars=0, location=0, toolbar=0, resizable=0, status=0');
}
|
I need help with making this javascript popup to work with php. I've read around and haven't been successful.
Thanks, |
|
|
|
|
Raven
Site Admin/Owner
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Sep 08, 2005 9:39 pm |
|
Add this to includes/javascript.php. I'll assume you want this called as a function in body onload.Code:echo "<scr^ipt>
function popup() {
window.open('http://www.vancouverbiz.net', 'popup', 'width=200, height=200, top=7, left=7, menubar=0, scrollbars=0, location=0, toolbar=0, resizable=0, status=0');
}
</scr^ipt>";
|
In your themes/YOURTHEME/theme.php is where the <body> tag is constructed so you can add your onLoad="popup" code there. You could also try using a window.onload=popup statement in your javascript routine. |
|
|
|
|
gstrategic
|
Posted:
Fri Sep 09, 2005 2:21 pm |
|
I did load the script in includes/javascript.php, but not successful with adding the onLoad command. I tried both; but I guess it's the syntax that I got wrong. Exactly how do you write the syntax to load this function and where?
Thanks, |
|
|
|
|
Raven
|
Posted:
Fri Sep 09, 2005 4:15 pm |
|
|
|
|
gstrategic
|
Posted:
Fri Sep 09, 2005 4:25 pm |
|
I tried that and it didn't work. |
|
|
|
|
Raven
|
Posted:
Fri Sep 09, 2005 4:28 pm |
|
It should if you loaded the javascript in the javascript.php file. Check the page source and see if the javascript is getting loaded correctly. Also type [ Only registered users can see links on this board! Get registered or login! ] in your browser URL to see what the error is, if any. |
|
|
|
|
|