Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-20-2004, 12:49 PM   #1 (permalink)
trogette
Registered User
 
Join Date: Oct 2004
Location: UK
Posts: 11
trogette is on a distinguished road
Send a message via AIM to trogette
still plodding away with pop-ups...

a few questions about this:

<head>
<title>product</title>
<script language="javascript"><!--
function popupWindow(url){ window.open(url,'popupWindow','toolbar=no,location =no,directories=no,dependent=yes,status=no,menubar =no,scrollbars=no,resizable=no,copyhistory=no,scre enX=150,screenY=150,top=150,left=150')}
//--></script>
</head>
<body>
<table>
<tr>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td align="right">
<table style="font-size: x-small">
<tr>
<td valign="top"><img src="http://www.babyarmadillo.com/thumbnails/babyidea.jpg" width=100 alt="babyidea"></td>
</tr>
<tr>
<td align="center" valign="middle" >
<a href="javascript:popupWindow('http://www.babyarmadillo.com/images/cuddle.jpg')" ><img src="http://www.babyarmadillo.com/thumbnails/cuddle.jpg" width=100 alt="snug as bugs"><br>click to enlarge</a></td>
</tr>
<tr>
<td align="center" valign="bottom" >
<a href="javascript:popupWindow('http://www.babyarmadillo.com/images/mountains_back_backview3.jpg')" ><img src="http://www.babyarmadillo.com/thumbnails/mountains_back_backview3.jpg" width=100 alt="aiska from the back"><br>click to enlarge</a></td>
</tr>
</table>
</tr>
</table>
</td>
</tr>
<\td>
</table>
</table>
</body>

no1: where does the </td> come from at the top of the page??

no2: why doesn't the 'dependent' attribute work? It's supposed to close the pop-up when I browse away or close the window, isn't it? I know I can do an 'onUnclick' doofer but surely this should work?

no3: I've been comparing my code above to the following from the php stuff I mentioned before:

<head>
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location =no,directories=no,status=no,menubar=no,scrollbars =no,resizable=yes,copyhistory=no,width=100,height= 100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<body>
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</body>

When the image is clicked on and the pop-up appears (from the above database) the pop-up window is quite small, and resizes to the size of the image. Is that because of the document.write statement? It's a neat trick that I'd like to copy!

Thanks
Tracy
trogette is offline   Reply With Quote
Old 10-20-2004, 04:51 PM   #2 (permalink)
trogette
Registered User
 
Join Date: Oct 2004
Location: UK
Posts: 11
trogette is on a distinguished road
Send a message via AIM to trogette
aha! I sorted the resizing thing so y'all can forget about the bit of php *grin* Basically there was another php file with a resize function, which I've cribbed into an html document which goes in the <a href> tag instead of the image path. cool huh?

So if anyone can tell me where the </td> comes from when I open the page, and why the 'dependant' attribute doesn't work, I'm rocking and rolling! woohoo!!
trogette is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:25 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting