Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Sun Jan 04, 2004 9:55 am
Hey Raven and the gang,
I want to open a couple html pages in a popup window from a page in the content module but I'd like the option of using a popup from anywhere so can I do a global popup script?
I read the script needs to be in includes/javascript.php but when I looked at that file it obviously wasn't standard javascript.
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sun Jan 04, 2004 10:03 am
Actually, it is standard javascript. PHP echos the code to the browser.
Just write your own popup function and place it in includes/my_header.php or add it as a function in mainfile.php. Then just call the function as needed in your page. Or, you could also add a target="" attribute to the anchor tag (link) in your pages.
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sun Jan 04, 2004 10:27 am
Could be a couple of things. When you first open your main web page and do a browse source, do you see your javascript function towards the top of the page? If not, then you have to either echo it to the browser or use the HEREDOC syntax. Place this code in my_header.php before the closing ?> tag
Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Sun Jan 04, 2004 11:10 am
It was inside the php tags.
Just like this
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/*
This file is to customize whatever stuff you need to include in your site
when the header loads. This can be used for third party banners, custom
javascript, popup windows, etc. With this file you don't need to edit
system code each time you upgrade to a new version. Just remember, in case
you add code here to not overwrite this file when updating!
Whatever you put here will be between <head> and </head> tags.
*/
echo "<script language=\"JavaScript\">
<!--
function winOpen(URL) {
window.open(
URL,
'popup',
'width=800,height=600,resizable=1,'
);
}
// -->
</script> ";
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum