Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

call popup from product description


vrrmmrider

Recommended Posts

Is there a way to add a link to call up an image as a popup from within the products description.

 

I would like to show pictures of different options. I've tried adding html code for window.open to no avail. Other html codes work fine.

 

I've searched the contributions but none of the popups are for the description area (unless i'm blind and didn't see it)

 

Thanks for any suggestions

Link to comment
Share on other sites

  • 2 weeks later...
I'm interested in this too.  :)

 

I had no problems doing this ....

 

in the description box I have this:

<a href="javascript:popupWindow('http://www.noahsark4kids.com/test/popup_bravado_sizing.php')">click here for Bravado Sizing Tips and Chart</a>

 

in the header of product_info.php I have this:

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
</head>

 

:-)

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I skipped doing a window.open.

 

Instead I just put in the links like this:

 

<a href='images/products/redCoiw.jpg' target='_blank'>
<img src='images/products/smRedCow.jpg' border=0></a> RED <br>
Click to Enlarge

Link to comment
Share on other sites

I skipped doing a window.open.

 

Instead I just put in the links like this:

 

<a href='images/products/redCoiw.jpg' target='_blank'>
<img src='images/products/smRedCow.jpg' border=0></a> RED <br>
Click to Enlarge

 

yep, that will work if it's just a pic. For me it's a sizing table, so only possible with a defined popup file.

 

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Thanks for the info. I've got it working, except it's not automatically resizing the popup window to match my different size charts. I'll go back and play around with the settings. :)

 

Thanks again,

Jeff

Link to comment
Share on other sites

Thanks for the info.  I've got it working, except it's not automatically resizing the popup window to match my different size charts.  I'll go back and play around with the settings.  :)

 

Thanks again,

Jeff

 

Hi Jeff,

 

I use this for resizing ... it only works if you have the popup php file.

 

<?php
/*
 $Id: popup_image.php,v XXX 2004/05/03 16:21:23

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
 Created by John Wood - www.z-is.net
*/
require('includes/application_top.php');
$navigation->remove_current_page();
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo STORENAME; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 if (document.layers) i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+215-i);
 self.focus();
}
//--></script>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
</head>
<body onload="resize();" <?php echo BACKGROUND_COLOR; ?>>

 

love

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

  • 2 months later...
Hi Jeff,

 

I use this for resizing ... it only works if you have the popup php file.

 

<?php
/*
?$Id: popup_image.php,v XXX 2004/05/03 16:21:23

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
?Created by John Wood - www.z-is.net
*/
require('includes/application_top.php');
$navigation->remove_current_page();
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo STORENAME; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
?if (document.layers) i=40;
?if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+215-i);
?self.focus();
}
//--></script>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
</head>
<body onload="resize();" <?php echo BACKGROUND_COLOR; ?>>

 

love

Monika

 

did you put that in the header of product_info.php instead of what you had earlier in this post?

Link to comment
Share on other sites

did you put that in the header of product_info.php instead of what you had earlier in this post?

 

 

lol nope, as you can see from the upper part of the code I posted, this is my popup_image.php :-) ... it will resize automatically according to the size of the pic.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...