Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links in JQuery - Should be Quick Answer


Sumisu

Recommended Posts

Posted

Hey

 

really simple, almost feel stupid asking, but could somebody tell me how to insert a link (I need to use jquery for the insert NOT in the php) so that the result can be "#" WITHOUT the result taking me back to the www.homepage.com/#

 

A bit more info, the Jquery adds a <a ...blar blar blar... href="#"> for a particual function when activated within the html, but oscommerce is treating it like www.homepage.com/# as apposed to it's usually treated - how do I stop it doing that?

 

I just need it to function on any page without it redirecting the page to the homepage.

 

Thanks for your help

Posted

Dont worry I dont need instructing on how to insert it to the html, I just need the link building syntax that will work from a .js file - I assume it must be possible, but I cant find how this is done anywhere.

Posted

You will need to add in a javascript snipped which which prevents the wanted link from doing its default "link" action and just trigger the wanted javascript function.

Posted

You will need to add in a javascript snipped which which prevents the wanted link from doing its default "link" action and just trigger the wanted javascript function.

 

Ah! Good idea :) Thanks... I was actually half way through attacking the job from a completely different angle which is actually looking a better way of getting the results im after, but if I hit another wall I'll be sure to do that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...