PDA

View Full Version : Javascript popup url


mike@rfsl
30-Nov-2005, 07:17 PM
Hi,

I've got a javascript popup url in my primary template.
I'm using this same template on both my product pages and checkout pages, however the popup only works from the product pages.

Could anyone suggest why this may be happening?

The link from the product pages is correct as coded in the template:
javascript:ShowPopUp('http://cic.rfsolutions.co.uk:8008/SmartKB/index.asp',800,800);

However on the checkout pages it changes to:
javascript:ShowPopUp('http://www.rfsolutions.co.uk/acatalog/http://cic.rfsolutions.co.uk:8008/SmartKB/index.asp',800,800);

I can't figure out why this is happening when both pages should be using the same template :confused:

NormanRouxel
01-Dec-2005, 12:14 AM
On the CGI generated pages, Actinic tries to adjust links to point them to the acatalog folder. Try obfuscating your URL and see if that fixes it. E.g.<a href="javascript:ShowPopUp('ht' + 'tp:/' + '/cic.' + 'rfsolutions.co.uk:8008/SmartKB/index.asp',800,800);" class="navlink">KNOWLEDGE BASE</a>P.S. Nice to see my NorCascade donationware on your site. I wasn't aware of that one.

P.P.S. Best look at your site in Firefox, with Tools / JavaScript console set. This will show up many CSS errors.

mike@rfsl
01-Dec-2005, 10:32 AM
Hi Norman,

I've tried that, unfortunately it has not fixed it. Now the link on the checkout pages comes up as

javascript:ShowPopUp('http://www.rfsolutions.co.uk/acatalog/ht' + 'tp:/' + '/cic.' + 'rfsolutions.co.uk:8008/SmartKB/index.asp',800,800);

Maybe I will need to use a different template for my checkout pages and remove the link altogether.

NormanRouxel
01-Dec-2005, 02:15 PM
Perhaps it's because the ShowPopUp routine is an Actinic one, and the script knows that and munges the 1st parameter. Try duplicating the ShowPopUp routine in actiniccore.js and give it a different name, then call that name instead.

If that still fails then try not using an <a ...></a> tag at all. E.g.<img src="kb.gif" style="cursor:pointer" onclick="ShowPopUp('ht' + 'tp:/' + '/cic.' + 'rfsolutions.co.uk:8008/SmartKB/index.asp',800,800);">PS are you aware that NorCascade is Donationware?

mike@rfsl
02-Dec-2005, 08:51 AM
Hi Norman,

Thanks I duplicated the routine and that worked.

PS. I could donate to you the code for our knowledge base if you like?