[thelist] href=# versus href=JavaScript.....
Anthony Baratta
Anthony at Baratta.com
Wed Feb 21 23:48:58 CST 2001
At 06:44 PM 2/21/2001 -0600, you wrote:
>I thought href=# was the more proper of the two (considering '#' is used for
>an inline anchor); and --not that this validates the statement-- I've
>watched browsers puke on a href=javascript: call, and that's outside the
>cases where javascript is just turned off ...
>
>(curiously) why does it irk you so?
Because of the way I think the browser works. Its trying to interpret the
href and go "somewhere", yet you're trying to using Javascript to do
something else, either related to another file or something with the
current page. This IMHO leads to confusion. Too many times have I seen
pages screwed up because of this.
What I'm not saying is that anchors are bad. I just think that if the HREF
is not designed to go to another page or anchor on the same page - you
shouldn't be using href=# as a place holder for "go no where". I have come
to the conclusion that its just sloppy coding.
Am I off base?
---
Anthony Baratta
President
Keyboard Jockeys
More information about the thelist
mailing list