1
kerkyra
debaser hack - javascript inside php with echo - openwithselfmain
  • 2007/10/12 17:46

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


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...

Login

Who's Online

129 user(s) are online (75 user(s) are browsing Support Forums)


Members: 0


Guests: 129


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits