Stop # appearing in URL

Status
Not open for further replies.

StuartC

New Member
Hey guys,

Quick question.

Im using an ajax tabs content script to switch between divs onscreen. I keep getting the # added to the url as you do when hitting the <a> tag to switch content.

Any way to stop this? as its really annoying to hit back on the browser twice.

Cheers.

Stuart
 

php.allstar

New Member
Hi, Which script are you using? Are you using a javascript library like jQuery or mootools or similar?

Can you show us a live working example?

I've encountered this before and I had to remove the href attribute on the links and then modify the javascript to load the correct tab based on other parameters... this was in jQuery.
 

tomed

New Member
Change the href="#" to href="javascript:"

Maybe create a blank function so it doesn't fall over in some browsers, e.g.
href="javascript:DoNothing()"
 

tomed

New Member
No problem!

Just for reference when anyone else is reading this : my last line was supposed to look like this:

HTML:
href="javascript:DoNothing()"
 
Status
Not open for further replies.
Top