PDA

View Full Version : Javascript popup in checkout template


Louise West
27-Jun-2003, 11:03 AM
Hi,

I have built the site at http://www.alarmsandstuff.co.uk and on the checkout template where you enter your Invoice address we have put a javascript popup at the bottom of the page "By placing an order with us you are agreeing with our Terms & Conditions " which works when you click on it. But when you click on the link, the page the link is on reverts to show a page with a list of all the shop sections. How can we get this page to stay the same when the link is clicked?.

Thanks.

Darren
30-Jun-2003, 01:01 PM
Hello Louise.

Rather than using java script, could not use target ="blank" in a normal href, for example

<a href ="http://mysite "target ="blank">Click here</a>

I hope this helps

Louise West
30-Jun-2003, 04:14 PM
Yes setting target to _blank does work for opening the link in a new window, but then you cannot specify the size of the new window that opens as you can when you use javascript. Any ideas?.

stuartn
30-Jun-2003, 09:06 PM
Hi Louise,

When we had to do this I firstly setup a Script function:

<SCRIPT>

function smallWindow(newContent)
{
winContent = window.open(newContent, 'nextWin', 'right=0, top=20,width=300,height=250, toolbar=no,scrollbars=no, resizable=no')
}
</SCRIPT>

then called it using:

<a href="javascript:smallWindow('http://www.tacklebargains.co.uk/ShippingDetails.htm')">

this works great in our catalog to popup a new window with the shipping details and also a currency convertor.

Hope this helps.

Cheers,
Stuart

Ben
02-Jul-2003, 10:58 AM
Hi Louise

Another way is to make use of the javascript in actiniccore.js and simply insert:
<a href="javascript:ShowPopUp('http://www.alarmsandstuff.co.uk/acatalog/terms_and_conditions.html',800,600)">Terms & Conditions</a>
for the link (800 and 600 being editable width and height).

Full instructions are on page 39 of the Advanced User Guide (downloadable from
here (http://www.actinic.co.uk/support/downloads.htm)).

Ben