This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes href link that does not do anything Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "href link that does not do anything" Watch "href link that does not do anything" New topic
Author

href link that does not do anything

Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
I have a link like this


This link will not cause any kind of page reload whatsoever right? at the very least, the client won't connect to server at all right? thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

What happened when you tested it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
well, the screen kinda like flickered a bit, but the circle that usually appears when loading page didn't appear. that's why I'm confused whether the flickering means contact to server or not. thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

That's not a great way to tell. Time to put some more tools in your toolbox!

For Firefiox, install the Firebug and HttpFox plugins. They'll help you monitor all Internet traffic to and from the browser.

Other modern browsers have their own built-in debugging tools.
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
OK, firebug's in. what's next? and FYI, I'm connected to localhost, not internet. thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

Firebug will show all Ajax traffic, HttpFox will show external traffic to and from the browser. It doesn't matter if localhost is the server or not.
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
okay, it works now. thanks.
Gautam Velpula
Greenhorn

Joined: Aug 04, 2008
Posts: 13
I guess you found the solution but using a # is linking to a bookmark on the page. Which might not be the best way to do what you want. You should return false; on click of that anchor tag.
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
wow, thanks for the heads up mate.
 
Don't get me started about those stupid light bulbs.
 
subject: href link that does not do anything
 
Similar Threads
selenium code for ahref
How to load themes dynamically?
How to download tgz file using jsp in browser
problem with server relative paths for images
importance of UML