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
tag
* 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
tag to look like:
* click 'Apply'
* update your site.
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>
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]
* you also need to change the
HTML Code:
<body>
HTML Code:
<body onload="if ( opener ){ if ( opener.WindowName ) document.forms.popform.target = opener.WindowName; }">
* update your site.