Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add "onClick:" to all Links?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-21-2007, 12:21 PM
 
prodij prodij is offline
 

Member
  
Join Date: Mar 2006
Location: Los Angeles
Posts: 23
 

Default 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!
__________________
X-Cart Pro Version 4.4.1
Reply With Quote
  #2  
Old 03-21-2007, 12:53 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

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

What are you trying to achieve with the onclick?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-21-2007, 02:24 PM
 
prodij prodij is offline
 

Member
  
Join Date: Mar 2006
Location: Los Angeles
Posts: 23
 

Default 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..
__________________
X-Cart Pro Version 4.4.1
Reply With Quote
  #4  
Old 03-21-2007, 02:28 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 03-21-2007, 02:31 PM
 
prodij prodij is offline
 

Member
  
Join Date: Mar 2006
Location: Los Angeles
Posts: 23
 

Default 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...
__________________
X-Cart Pro Version 4.4.1
Reply With Quote
  #6  
Old 03-21-2007, 02:38 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 03-21-2007, 03:39 PM
 
prodij prodij is offline
 

Member
  
Join Date: Mar 2006
Location: Los Angeles
Posts: 23
 

Default 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..
__________________
X-Cart Pro Version 4.4.1
Reply With Quote
  #8  
Old 03-21-2007, 04:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 03-21-2007, 04:21 PM
 
prodij prodij is offline
 

Member
  
Join Date: Mar 2006
Location: Los Angeles
Posts: 23
 

Default 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..
__________________
X-Cart Pro Version 4.4.1
Reply With Quote
  #10  
Old 03-21-2007, 04:27 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:11 PM.

   

 
X-Cart forums © 2001-2020