Jump to content

[SOLVED] Hyperlink Ajax Onclick Bookmark Question


sKunKbad

Recommended Posts

I'm using hyperlinks with onclick events to change the page contents. The hyperlinks have onclick events that call the php/mysql content that fills the content div of the page. I was under the impression that since there was an onlick event in my hyperlink that the onclick would take precidence over actual href. I need to be able to have the links in href so that people can bookmark the actual page views. How can this be done?

Once again I solved my own question by looking at code from around the net somewhere. If you have hyperlinks that are using the onclick event, the proper format for the hyperlink is as follows:

 

<a href='javascript:;' onclick='yourAjaxFunction();'>Click me</a>

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.