| | |
PHP Pop-up attribute question
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2005
Posts: 15
Reputation:
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 3:46 pm.
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 ::
![]() |
Similar Threads
- 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!
Views: 2092 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date datepart directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link list login loop mail menu methods mlm mod_rewrite multiple mysql oop parse password paypal pdf php problem query radio random recursion regex remote script search select seo server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web webdesign xml youtube





