Announcement

Collapse
No announcement yet.

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

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...

    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 </head> tag

    <script language="JavaScript"> <!-- (V11) // set the window name to unique value Now = new Date(); var WindowName = "W" + Now.getTime(); window.name = WindowName; //--> </script>

    * 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 '<body>' tag to look like:

    <body onload="if ( opener ){ if ( opener.WindowName ) document.forms.popform.target = opener.WindowName; }">


    * click 'Apply'

    * update your site.
Working...
X