Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

php within javascript

0 views
Skip to first unread message

pecan

unread,
Dec 17, 2009, 5:31:58 AM12/17/09
to
I have another problem, and that is that I need to insert some php
withing javascript, in order to open a popup window with the right image
in it.
The page in question is www.sipawards.com/results.php and the code that
needs it is:
while ($row= mysql_fetch_array($result)) {
$title = $row["brand"];
$company = $row["company"];
$category = $row["category"];
$website = $row["website"];
$country = $row["country"];
$price = $row["price"];
$age = $row["age"];
$certificate = $row["certificate"];
$alcohol = $row["alcohol"];
$award = $row["award"];
$photo = $row["photo"];
$pic = "09pictures/$photo.jpg";
?>

<?php

echo <<< EOS
<div class="results">
<div class='thumbnail'><a href="09pictures/$photo.jpg"
target="_blank"><img src='09pictures/tn/tn$photo.JPG'></a></div>
<p>{$count}.)&nbsp; <b><a href="09pictures/{$photo}.jpg"
target="_blank">{$title}</a>, </b>&nbsp; {$company}, &nbsp; &nbsp; <a
href="http://{$website}" target="_blank">{$website}</a>, Category:
{$category}, &nbsp;Country: {$country}, &nbsp; {$price}, &nbsp;Age:
{$age}, &nbsp; {$alcohol}, &nbsp; <a href="a/{$certificate}.pdf"
target="_blank"><b>{$award} Medal</b></a> &nbsp; <b>Certificate:
{$certificate}</b></p>
<p class="separator">**********</p>

</div>
EOS;

On the line where it says target="_blank" I ned to somehow get it to
open up an separate window. I can get a popup if I use
<a href="javascript:;"
onclick="MM_openBrWindow('popups.php','','width=500,height=400')">
but I can't get popups.php to identify the image.

Can anyone help?

--
== Not nuts, just a little eccentric ==

0 new messages