H
harold
hi guys,
How can i create a hyperlink that also activates with the enter
key?
How can i create a hyperlink that also activates with the enter
key?
harold said:hi guys,
How can i create a hyperlink that also activates with the enter
key?
Oh I knew exactly what you were after. I was trying to point out that usinghi richard,
that's not quite what i'm after but thanks for your help
anyway
rf said:[upsidedown posting corrected]Oh I knew exactly what you were after. I was trying to point out that usinghi richard,
that's not quite what i'm after but thanks for your help
anyway
the enter key to activate a link is a *user* action, not an *author* action.
It would be rather simple to use javascript to hook the enter keys onkeydown
event and cause it to do something diferent. However what if I, as a user,
wish to use the above key sequence? Remember, I may not be able to use a
mouse. When I press enter instead of the link I have laborously tabbed to
firing a totally different one does. Your site becomes unnavigable to a
keyboard user.I also might have typed another address into the address bar
and pressed enter. Your link fires, not the one I wish to go to.
You might be deemed to be intentionally discriminating against certain
disabled people which, as you must know, can be illegal in Australia
Cheers
Richard.
harold said:i'm looking at a simple web style training booklet to show the
elderly how to do a certain action and prior to learning the mouse i would
like them to be able to enter the next page by just pressing enter.
Ryan Stewart said:How about a submit button? That's automatically triggered by enter.
Something like this:
<input type="submit" onclick="location.href='www.w3schools.com';">
harold said:i'm looking at a simple web style training booklet to show the
elderly how to do a certain action and prior to learning the mouse i would
like them to be able to enter the next page by just pressing enter.
You'll have to forgive me. My limited html development experience is allChris Morris said:It's only automatically triggered _in some browsers_ if any part of
the form has focus. And what's the onclick for? (I know what it does,
I just can't see why you need it there)
Ryan Stewart said:You'll have to forgive me. My limited html development experience is all
with IE. As for the onclick, how else does it know where to go if it isn't
part of a form and you don't specify an onclick?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.