PHP interesse |
|
Ik gebruik een Popup script van java voor de site die ik aant maken ben maar als ik daar op een smilie klik moet die weer die smilie in het form plaatsen waar ik op de link heb geklikt om het popup scherm te openen.
Hoe kan ik een javascript iets in het vorige scherm laten plaatsen?
<?php
$sql = "SELECT emoticon, code, smile_url FROM smilies ";
$sql .= "ORDER BY smilies_id";
$resultaat = mysql_query($sql) or die(mysql_error());
$table = "<table>";
$smilies = array();
$counter = 0;
while ($row = mysql_fetch_object($resultaat))
{
if (!(in_array($row->smile_url , $smilies)))
{
array_push($smilies, $row->smile_url);
if (($counter % 7) == 0)
{
if ($counter != 0)
{
$table .= "</tr>";
}
$table .= "<tr>";
}
$table .= "<td><a href=\"javascript:addSmiley('" . $row->code . "');\"><img border=\"0\" src=\"..\images/smiles/" . $row->smile_url . "\" alt=\"" . $row->emoticon . "\"></a></td>";
$counter++;
}
}
$table .= "</tr></table>";
echo $table;
?>
<?php $sql = "SELECT emoticon, code, smile_url FROM smilies "; $sql .= "ORDER BY smilies_id"; $table = "<table>"; $counter = 0; { if (!(in_array($row->smile_url , $smilies))) { if (($counter % 7) == 0) { if ($counter != 0) { $table .= "</tr>"; } $table .= "<tr>"; } $table .= "<td><a href=\"javascript:addSmiley('" . $row->code . "');\"><img border=\"0\" src=\"..\images/smiles/" . $row->smile_url . "\" alt=\"" . $row->emoticon . "\"></a></td>"; $counter++; } } $table .= "</tr></table>"; ?>
function popup(page,title,width,height) {
var winl = (screen.width - width) / 2;
var wint = (screen.height - height) / 2;
window.open(''+page,''+title,'width='+width+',height='+height+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbar=no');
}
function popup(page,title,width,height) { var winl = (screen.width - width) / 2; var wint = (screen.height - height) / 2; window.open(''+page,''+title,'width='+width+',height='+height+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbar=no'); }
met dit script open ik het popup scherm (script is van hier)
|