Print Page | Close Window

Close Window by Clicking on Detail Image

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=913
Printed Date: 21-April-2025 at 8:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Close Window by Clicking on Detail Image
Posted By: Jackalope
Subject: Close Window by Clicking on Detail Image
Date Posted: 24-June-2007 at 2:08am
Just incase anyone want's this feature, you can copy a few lines of code in two different files. What it does is when you view the detail product image, if you click on the image the window will close. Also, when you view the additional images (if there are any), if you click on the detail image (not the thumbnails) then the window will close as well.

In includes/javascripts/pcWindowsViewPrd.asp change the following towards the bottom of the page...

from this:

doc.write('<IMG SRC="' + imagename + '">

to this:

doc.write('<IMG SRC="' + imagename + '" onClick="self.close()">



Also, in /pc/viewPrdPopWindow.asp change the following towards the bottom of the page...

from this:

    <td height="100%">
    <div align="center">
    <%
    pLgimageURL = "" '// clear large image value so we dont get a zoom button
    pcs_ProductImage
    %>
    </div>
    </td>

to this:

    <td height="100%">
    <div align="center">
    <a href="javascript:closeWindow();">
    <%
    pLgimageURL = "" '// clear large image value so we dont get a zoom button
    pcs_ProductImage
    %>
    </a>
    </div>
    </td>

Now I'm not a programmer by any means so if anyone sees a mistake or a better way, please make corrections.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net