I'm trying to call a javascript function on a link inside a php page, but appear to have some issues.
I want it to popup a window when someone clicks on a link. I currently have it setup like this:
I have my code as follows:
The Server Info link is what I am trying to get have a popup window appear for, but everytime I put the in the code for the link
it just causes the page not to load. Can anyone help me resolve this? TIA!
Enkrypted
A+
I want it to popup a window when someone clicks on a link. I currently have it setup like this:
I have my code as follows:
Code:
<head>
<script type="text/javascript">
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=
500,height=500,left = 390,top = 262');");
}
</script>
</head>
<?php
// BEGIN: Added in v2.40.00 - Mantis Issue 0001043
//$index = 0;
//if (!defined('INDEX_FILE')) define('INDEX_FILE', true); // Set to FALSE
to hide right blocks
//if (defined('INDEX_FILE') AND INDEX_FILE===true) {
// auto set right blocks for pre patch 3.1 compatibility
// $index = 1;
//}
// END: Added in v2.40.00 - Mantis Issue 0001043
$bgcolor1 = '#171717';
$bgcolor2 = '#171717';
$bgcolor3 = '#171717';
$bgcolor4 = '#171717';
$textcolor1 = '#CCCCCC';
$textcolor2 = '#CCCCCC';
function themeheader() {
global $module_name, $banners, $admin, $user, $name, $sitename,
$index, $admin_file, $nukeurl, $slogan, $nukeNAV;
echo '<body>';
if (!empty($nukeNAV)) $nukeNAV = '<span class="left"> </span><span
class="right"> </span>'.$nukeNAV.';
else {
$nukeNAV = '<span class="right"> </span><span
class="left"> </span>
<a href="./index.php">Home</a>
<a href="./modules.php?name=News">News</a>
<a href="javascript:popup('servers.html')">Server Info</a>
<a href="./modules.php?name=Forums">Forum</a>
<a href="./modules.php?name=Private_Messages">Private
Messages</a>
<a href="./modules.php?name=Your_Account">Account</a>
<a href="./modules.php?name=Feedback">Contact</a>';
if (is_admin($admin)) {
$nukeNAV .= '<a href="./admin.php">Admin</a>';
} else {
$nukeNAV .= '<a
href="./modules.php?name=Search">Search</a>';
}
}
echo '
The Server Info link is what I am trying to get have a popup window appear for, but everytime I put the in the code for the link
Code:
<a href="javascript:popup('servers.html')">Server Info</a>
Enkrypted
A+