•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,214 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1446 | Replies: 1
![]() |
•
•
Join Date: Mar 2005
Posts: 14
Reputation:
Rep Power: 4
Solved Threads: 0
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!
[php]<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
}
?>[/php]
Thanks for any assistance that you can provide!
[php]<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
}
?>[/php]
Last edited by Gary King : Nov 13th, 2005 at 2:46 pm.
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 4
Solved Threads: 7
You can build all of the window chrome variables into the window.open call, like:
[PHP]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');[/PHP]
Have a play with some of the variables and see what they do.
[PHP]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');[/PHP]
Have a play with some of the variables and see what they do.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
- Pop-up attribute question (JavaScript / DHTML / AJAX)
- dynamically generated textboxes & radio buttons php, insert into db (PHP)
- Set up manually, php 5.0 with apache's compatible version (PHP)
- My log of annoingness (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: Parse error at last line of page's code
- Next Thread: Need some Help with PHP Craps game!


Linear Mode