1
hi i'm trying to make an image link to open in a popup window using javascript but the script is not working! anybody knows whats wrong with the following code??
Quote:
<a href=javascript:openWithSelfMain('/modules/debaser/popup.php?select='$radio_id,'Radio',10,10);'>
this code is part of a file i made for debaser called radio.php and is responsible for showing a list with the stations added in the module (see demo at www.mykerkyra.gr/modules/debaser/radio.php)
the code is the following
Quote:
<?php
include '../../mainfile.php';
include XOOPS_ROOT_PATH.'/modules/debaser/include/functions.php';
include XOOPS_ROOT_PATH.'/header.php';
include_once XOOPS_ROOT_PATH.'/modules/debaser/class/debasertree.php';
global $xoopsDB;
global $admin, $radioid;
echo "
<table class='outer' width='100%'>
<tr>
<td colspan='4' class='odd'>
<strong>"._AM_DEBASERRAD_PROG."</strong>
</td>
</tr>";
$count = 0;
$idnum = 1;
$sql = "SELECT radio_id, radio_name, radio_picture, radio_url
FROM ".$xoopsDB->prefix('debaserradio')."
ORDER BY radio_name ASC";
$result = $xoopsDB->query($sql);
while (list($radio_id, $radio_name, $radio_picture,$radio_url) = $xoopsDB->fetchRow($result)) {
if ($radio_id != "") {
if ($count == 0) {$count = 1;}
echo "
<tr><td class='even' align='center' width='60'><img src='http://www.mykerkyra.gr/modules/debaser/images/$radio_picture' width='60' height=35' alt='$radio_name'/></strong></td>
<td class='odd'>$radio_name</td>
<td class='even' align='center' width='40'>
<a href=javascript:openWithSelfMain('/modules/debaser/popup.php? select='$radio_id,'Radio',10,10);'> -----> this part of the code is the one not working at all
//<a target='_new' href='popup.php?select=$radio_id'> ----> this works but not as a pop up window
<img src='images/listen.jpg' alt='Listen' title='Click to listen' /></a></td>
<td class='odd' align='center' width='40'>
<a target='_blank' href='$radio_url'>
<img src='images/homepage.gif' alt='Home Page' title='Click to visit homepage' /></a></td></tr>";
$idnum = $idnum + 1;
}
}echo "</table>";
include_once XOOPS_ROOT_PATH.'/footer.php';
?>
www.guidemap.gr - Beta is out...