PDA

View Full Version : Popup on checkout page


acorcor
16-Sep-2003, 01:14 PM
Was wanting to allow a popup window to appear on checkout page using <body onload="">.
Have tried it but Actinic overwrites the onload, once compiled.
Is it possible to go in and edit the Onload function with Actinic?

NormanRouxel
16-Sep-2003, 02:22 PM
Try this:-

Since Actinic uses the onload event in the <body> tag to run the PreloadImages routine in actiniccore.js you could put your code in there (right at the beginning). Your code will run and then the normal PreloadImages code will follow on.

Norman

acorcor
19-Sep-2003, 11:51 AM
Thanks for that Norman. The only problem is that the popup appears on all the pages within the site - i was wanting it just to popup on the checkout page. Is it possible? Will i have to write a function or something? If so how would i write it?

Many thanks!

NormanRouxel
19-Sep-2003, 12:46 PM
Easy.

First dump the earlier suggestion about putting your code into actiniccore.js as this is a cleaner solution anyway (sorry I didn't think of it 1st time).

In Design / Options / Layouts you can specify a simpler template for the Checkout pages (or make a copy of the usual Act_Primary.html and use that instead). Now in that template look for :-


OnLoad="NETQUOTEVAR:ONLOAD"

replace that with

OnLoad="myjavascript;NETQUOTEVAR:ONLOAD"

Where myjavascript is the call to your function ( which you can patch in somewhere above the </head> statement).

So your code will run and then the Actinic PreloadImages stuff will follow as usual.

Norman