Announcement

Collapse
No announcement yet.

How can I stop the site reloading in the pop up window when using the 'Includes Add..

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

    How can I stop the site reloading in the pop up window when using the 'Includes Add..

    How can I stop the site reloading in the pop up window when using the 'Includes Add to cart' layout?

    If you use the 'Includes Add to Cart Button' layout within an extended info page (as a pop-up), when you click on the 'add to cart ' button, the site then loads in to the pop-up rather than the main window - you can prevent this by doing the following:

    * make sure that the each page open has a unique name

    * add this JavaScript in the overall layout just before the
    HTML Code:
    </head>
    tag

    HTML Code:
       [FONT="Courier New"]   <script language="JavaScript"> <!-- (V11) // set the window name to unique value Now = new Date(); var WindowName = "W" + Now.getTime(); window.name = WindowName; //--> </script>
    [/FONT]
    * then in the extended information layout (Includes Add to Cart Button) you need to give the FORM the name "popform", so it looks like:



    * you also need to change the
    HTML Code:
    <body>
    tag to look like:

    HTML Code:
    <body onload="if ( opener ){ if ( opener.WindowName ) document.forms.popform.target = opener.WindowName; }">
    * click 'Apply'

    * update your site.
    Attached Files
Working...
X