navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Number sign (#) as href

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Number sign (#) as href
Page: [1]
 
Mane

 

Posts: 78
Joined: 7/7/2005
Status: offline

 
Number sign (#) as href - 5/2/2008 22:30:52   
I think I remember reading something about this but I can't find it now...
Is it acceptable to use the number/hash sign # in links that are only used to trigger javascript but should stay on the same page, or are there some accessibility problems etc? Is there some better alternative, for example not even including a href property?
When using the href=# method, the page scrolls back to the top. Is there a way to avoid this?

Thanks
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Number sign (#) as href - 5/4/2008 11:21:34   
For me, if all I want to do is trigger a JS, I do something like this:

<a href="javascript:functionName();">Click Me</a>

No # there. The href doesn't have to be a link specifically.

Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Mane)
Mane

 

Posts: 78
Joined: 7/7/2005
Status: offline

 
RE: Number sign (#) as href - 5/6/2008 18:33:03   
Oh, that seems simple. Thanks!

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Number sign (#) as href
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts