open window
Posted: Tue Mar 04, 2003 12:07 am
When clicking a thumbnail i would like the user to see a larger image in a new window. my open window function (javascript) is as follows:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function open_window(url) {
var NEW_WIN = null;
NEW_WIN = window.open ("", "RecordViewer","toolbar=no,width="+<?php echo $new_win_width ?>+",height="+<?php echo $new_win_height?>+",directories=no,status=no,scrollbars=yes,resize=yes,menubar=no");
NEW_WIN.location.href = url;
}
//-->
</SCRIPT>
the thumbnail is here:
<tr>
<td align="right" valign="top" bgcolor="#EFEFEF" width="200"><strong>photo:</strong></td>
<td bgcolor="#EFEFEF" width="300"><?php echo "<img src=\"$pictlarge\">" ?></td>
</tr>
Assuming that the larges image is called pictverylarge and that a query has been used to retrieve it from the database, how would I get the image in this new window when clicking the thumbnail. Undoubtfully I need to use an ahref tag and ca;; the open_window function but i am not too sure how to set it up. I am using an older version of php 4.03 in which superglobals are not relevant.
can anyone help?
thanks
hans
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function open_window(url) {
var NEW_WIN = null;
NEW_WIN = window.open ("", "RecordViewer","toolbar=no,width="+<?php echo $new_win_width ?>+",height="+<?php echo $new_win_height?>+",directories=no,status=no,scrollbars=yes,resize=yes,menubar=no");
NEW_WIN.location.href = url;
}
//-->
</SCRIPT>
the thumbnail is here:
<tr>
<td align="right" valign="top" bgcolor="#EFEFEF" width="200"><strong>photo:</strong></td>
<td bgcolor="#EFEFEF" width="300"><?php echo "<img src=\"$pictlarge\">" ?></td>
</tr>
Assuming that the larges image is called pictverylarge and that a query has been used to retrieve it from the database, how would I get the image in this new window when clicking the thumbnail. Undoubtfully I need to use an ahref tag and ca;; the open_window function but i am not too sure how to set it up. I am using an older version of php 4.03 in which superglobals are not relevant.
can anyone help?
thanks
hans