Announcement

Collapse
No announcement yet.

Custom pop-up window when clicking on product image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom pop-up window when clicking on product image

    Using developer v6 I followed the instructions in the advanced users guide to create a pop-up window when clicking on the product image. Now when I go the preview page EVERY product image can be clicked on and up pops a blank page. I would have thought that unless you chose in the product section - advanced view, "+" and adding the new variable you created, that clicking on the image would not be available. What can I do to only have available the click-through for those products that I want to have it?

    By the way the product that I tested this with also showed a blank page until in the product section - advanced view - properties - clicked on "Use as CUSTOMVAR" - then it went to the external page assigned - this was not in the directions.

    #2
    That Advanced Guide item has several problems.

    As you saw it would pop up a blank page on every image where there was no Customvar.

    The simple fix would be to edit actiniccore.js and change the line
    Code:
    	window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
    
    to be
    
    	window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
    This fixes the blank page popup but has the cursor changing to a Hand on every image. So users might wonder why they're given a click here type hint when there's nothing going to happen.

    Here is an alternative solution that avoids these problems. Undo these AUG changes and instead replace Act_ProductImage.html with the following:-

    Code:
    <!-- ProductImage HTML begin -->
    <!-- This file is used to build the product image markup. -->
    
    <script language=JavaScript>
    <!--
    var url = 'CUSTOMVAR:URL';
    if ( url ) document.write('<A HREF="Java&#83;cript:ShowPopUp(&#92;'' + url + '&#92;',500,400)">');
    // -->
    </script>
    
    <IMG SRC="NETQUOTEVAR:IMAGEFILE"
    	  ALT="NETQUOTEVAR:ALTERNATETEXT"
    	  BORDER=0
    	  NETQUOTEVAR:IMAGEHEIGHT
    	  NETQUOTEVAR:IMAGEWIDTH
    	  NETQUOTEVAR:OTHERIMAGEMARKUP>
    
    <script language=JavaScript>
    <!--
    if ( url ) document.write('</A>');
    // -->
    </script>
    
    <!-- This file is used to build the product image markup. -->
    <!-- ProductImage HTML end -->
    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Ooops. A an error in the "simple" fix above. Here's the correction.
      Code:
      The simple fix would be to edit actiniccore.js and change the line
      
      code	window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
      
      to be
      
      	if ( sUrl ) window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment

      Working...
      X