I am unable to get my pop-up to resize or hide the toolbar when I select a thumbnail. I entered the width & height in my onclick event, bu that did not seem to work. I am guessing that I probably need to enter the attributes in the function and if so, where do they go?

Thanks for any assistance that you can provide!

<script type="text/javascript">
function openWindow(modelnum)
{
prodWindow=window.open("lgImg.php?modelnum="+modelnum+"","null");
prodWindow.focus();
}
</script>

<?php
  while ($myrow = mysql_fetch_array($myresult))
    {
?>
<tr>
    <td><a href='#' onclick='openWindow("<?php echo $myrow['modelnum']; ?>")'><img src='../images/products/<?php echo $myrow ["imgsm"]; ?>'  border='0' /></td>
<?php
    }
?>

You can build all of the window chrome variables into the window.open call, like:

prodWindow=window.open("lgImg.php?modelnum="+modelnum+"","windowname", 'directories=no, status=no, config=top=100, screenY=150, left=50, screenX=50, location=no, toolbar=no, menubar=no, resizable=yes, scrollbars=yes, width=550, height=350');

Have a play with some of the variables and see what they do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.