X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add "onClick:" to all Links? (https://forum.x-cart.com/showthread.php?t=29878)

prodij 03-21-2007 12:21 PM

Add "onClick:" to all Links?
 
I don't know if this belongs here, but I want to add "onClick:" to all links on xcart. anyone know how this can be done easily? or do I have to go into the template and edit every link?

basically:

regular links:
Code:

<a href="http://www.mysite.com"></a>

change to:
Code:

<a href="http://www.mysite.com" onClick:blah()></a>

any help is much appreciated!

Thanks!

balinor 03-21-2007 12:53 PM

Re: Add "onClick:" to all Links?
 
What are you trying to achieve with the onclick?

prodij 03-21-2007 02:24 PM

Re: Add "onClick:" to all Links?
 
I want to create an exit popup that shows customers what other deals we have when they leave the site... basically how the exit popup works is.. it requires all links within the site to have the onclick command.. without it, every click on every link will result in a popup -- which i don't want..

balinor 03-21-2007 02:28 PM

Re: Add "onClick:" to all Links?
 
There has to be a better way than adding it to all links...a javascript in the head perhaps?

prodij 03-21-2007 02:31 PM

Re: Add "onClick:" to all Links?
 
that's what i thought.. until i did some research... i've searched all over on google and forums.. and looked for examples.. there's really no easy way around this...

balinor 03-21-2007 02:38 PM

Re: Add "onClick:" to all Links?
 
Have you tried hotscripts.com, scriptlance.com, webmasterworld.com, etc? You'll definitely find them there, but be advised, popups are probably the most frowned upon of all web 'tricks' and will cost you customers. In addition, most browsers can now block all forms of pop-ups, so this may be a wasted efford.

prodij 03-21-2007 03:39 PM

Re: Add "onClick:" to all Links?
 
yup tried all that... except for webmasterworld.. i know it's frowned upon.. and they say only "intelligent" people hate these kinds of stuff.. thing is.. there are only a few amt of ppl that really hate popups vs people who don't mind..

balinor 03-21-2007 04:10 PM

Re: Add "onClick:" to all Links?
 
Quote:

and they say only "intelligent" people hate these kinds of stuff.. thing is.. there are only a few amt of ppl that really hate popups vs people who don't mind..

I think you need to do a little reading...popups are a huge no-no on the web, and there are only a few people who DON'T mind them.

prodij 03-21-2007 04:21 PM

Re: Add "onClick:" to all Links?
 
we all know conventional wisdom say that popups are no no in general.. but I haven't tested this idea myself.. how often are conventional wisdom wrong in the programming world? I appreciate that you're looking out for me.. but I just want to get this thing done.. test it.. and if it's not worth it.. throw it away.. if it works.. then it'll be that much better..

balinor 03-21-2007 04:27 PM

Re: Add "onClick:" to all Links?
 
I'm talking from 10 years and hundreds of clients worth of experience. But sometimes you just have to test things out for yourself, so have a ball :)


All times are GMT -8. The time now is 02:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.