william00 Posted September 12, 2007 Posted September 12, 2007 <script language="javascript"><!-- document.write('<?php echo '<a href="java script: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> Here is my popup script in my product_info.php When ever i want to click the popup it say object expected. Here is a link to my site. www.sgonlines.com
germ Posted September 12, 2007 Posted September 12, 2007 You're missing this code: <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> in the "<HEAD>" section of product_info.php The board will mess the code up, but the line that starts with "window.open(" and the next two lines are supposed to be one big long line. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
william00 Posted September 18, 2007 Author Posted September 18, 2007 You're missing this code: <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> in the "<HEAD>" section of product_info.php The board will mess the code up, but the line that starts with "window.open(" and the next two lines are supposed to be one big long line. hi i have the above java script in my product_info.php . But i still get the same error. Please help me
germ Posted September 18, 2007 Posted September 18, 2007 This is the "<HEAD>" section from your page: <head> <title>sgonlines</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> <!-- #apDiv1 { position:absolute; left:458px; top:22px; width:135px; height:47px; z-index:1; } #apDiv2 { position:absolute; left:622px; top:21px; width:125px; height:47px; z-index:2; } #apDiv3 { position:absolute; left:769px; top:21px; width:111px; height:47px; z-index:3; } #apDiv4 { position:absolute; left:316px; top:370px; width:558px; height:398px; z-index:4; } #apDiv5 { position:absolute; left:403px; top:312px; width:352px; height:54px; z-index:5; } #apDiv6 { position:absolute; left:412px; top:331px; width:275px; height:37px; z-index:5; } body { background-image: url(images/index.php_29.gif); } --> </style> <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="http://www.sgonlines.com/fashion/includes/js/prototype.js"></script> <script type="text/javascript" src="http://www.sgonlines.com/fashion/includes/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="http://www.sgonlines.com/fashion/includes/js/lightbox.js"></script> </head> It's still missing the code I posted. :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted September 18, 2007 Posted September 18, 2007 BTW... The code needs to be in the <HEAD> section of product_info.php If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.