hyperlink that uses the enter key

Discussion in 'HTML' started by harold, Nov 24, 2003.

  1. harold

    harold Guest

    hi guys,
    How can i create a hyperlink that also activates with the enter
    key?
     
    harold, Nov 24, 2003
    #1
    1. Advertising

  2. harold

    rf Guest

    "harold" <> wrote in message
    news:fyiwb.24713$...
    > hi guys,
    > How can i create a hyperlink that also activates with the

    enter
    > key?


    Press the tab key until the link is focused.

    Press enter.

    Cheers
    Richard.
     
    rf, Nov 24, 2003
    #2
    1. Advertising

  3. harold

    harold Guest

    hi richard,
    that's not quite what i'm after but thanks for your help
    anyway

    regards


    "rf" <> wrote in message
    news:sFiwb.24724$...
    >
    > "harold" <> wrote in message
    > news:fyiwb.24713$...
    > > hi guys,
    > > How can i create a hyperlink that also activates with the

    > enter
    > > key?

    >
    > Press the tab key until the link is focused.
    >
    > Press enter.
    >
    > Cheers
    > Richard.
    >
    >
     
    harold, Nov 24, 2003
    #3
  4. harold

    rf Guest

    "harold" <> wrote in message
    news:_%twb.25711$...

    [upsidedown posting corrected]
    >
    > "rf" <> wrote in message
    > news:sFiwb.24724$...
    > >
    > > "harold" <> wrote in message
    > > news:fyiwb.24713$...
    > > > hi guys,
    > > > How can i create a hyperlink that also activates with the

    > > enter
    > > > key?

    > >
    > > Press the tab key until the link is focused.
    > >
    > > Press enter.
    > >

    > hi richard,
    > that's not quite what i'm after but thanks for your help
    > anyway
    >

    Oh I knew exactly what you were after. I was trying to point out that using
    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.
     
    rf, Nov 24, 2003
    #4
  5. harold

    Ryan Stewart Guest

    How about a submit button? That's automatically triggered by enter.
    Something like this:

    <input type="submit" onclick="location.href='www.w3schools.com';">

    --
    Ryan Stewart, A1C USAF
    805 CSPTS/SCBE

    "harold" <> wrote in message
    news:fyiwb.24713$...
    > hi guys,
    > How can i create a hyperlink that also activates with the

    enter
    > key?
    >
    >
    >
    >
    >
    >
     
    Ryan Stewart, Nov 24, 2003
    #5
  6. harold

    harold Guest

    hi richard
    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.



    "rf" <> wrote in message
    news:1Vvwb.25823$...
    >
    > "harold" <> wrote in message
    > news:_%twb.25711$...
    >
    > [upsidedown posting corrected]
    > >
    > > "rf" <> wrote in message
    > > news:sFiwb.24724$...
    > > >
    > > > "harold" <> wrote in message
    > > > news:fyiwb.24713$...
    > > > > hi guys,
    > > > > How can i create a hyperlink that also activates with

    the
    > > > enter
    > > > > key?
    > > >
    > > > Press the tab key until the link is focused.
    > > >
    > > > Press enter.
    > > >

    > > hi richard,
    > > that's not quite what i'm after but thanks for your help
    > > anyway
    > >

    > Oh I knew exactly what you were after. I was trying to point out that

    using
    > 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, Nov 25, 2003
    #6
  7. harold wrote:
    > 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.


    Are you sure this should really be an HTML page? Sounds like it would be
    better as a fullscreen GUI application.
     
    Leif K-Brooks, Nov 25, 2003
    #7
  8. harold

    Chris Morris Guest

    "Ryan Stewart" <> writes:
    > How about a submit button? That's automatically triggered by enter.
    > Something like this:
    >
    > <input type="submit" onclick="location.href='www.w3schools.com';">


    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)

    --
    Chris
     
    Chris Morris, Nov 25, 2003
    #8
  9. harold wrote:

    > 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.


    Well, not quite what you want, but if you get these people to use Opera 7
    as their browser, they can automatically move on to the next page using
    space bar if you use this code somewhere between <head> and </head>:

    <link rel="next" href="nextpage.html">

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 25, 2003
    #9
  10. harold

    Ryan Stewart Guest

    "Chris Morris" <> wrote in message
    news:...
    > "Ryan Stewart" <> writes:
    > > How about a submit button? That's automatically triggered by enter.
    > > Something like this:
    > >
    > > <input type="submit" onclick="location.href='www.w3schools.com';">

    >
    > 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)
    >

    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?
     
    Ryan Stewart, Nov 25, 2003
    #10
  11. harold

    Steve Pugh Guest

    "Ryan Stewart" <> wrote:
    >"Chris Morris" <> wrote in message
    >news:...
    >> "Ryan Stewart" <> writes:
    >> > How about a submit button? That's automatically triggered by enter.
    >> > Something like this:
    >> >
    >> > <input type="submit" onclick="location.href='www.w3schools.com';">

    >>
    >> 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)
    >>

    >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?


    Netscape 4, for example, will not display input elements unless they
    are inside a form element. Having input elements on their own is
    risky.

    <form method="get" action="http://www.example.com/">
    <input type="submit">
    </form>

    will work just the same as your onclick version but will also work
    when JavaScript isn't enabled.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Nov 25, 2003
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Nicholson
    Replies:
    10
    Views:
    772
    Steven Cheng[MSFT]
    Aug 23, 2005
  2. =?Utf-8?B?VmlzaHdhbmF0aGFuIFJhbWFu?=

    How to identify the control when User uses the Enter Key

    =?Utf-8?B?VmlzaHdhbmF0aGFuIFJhbWFu?=, Aug 24, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,880
    =?Utf-8?B?dXJhbA==?=
    Aug 24, 2005
  3. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    447
    Anders Matthiessen
    Jan 12, 2005
  4. M P
    Replies:
    1
    Views:
    556
  5. HopfZ
    Replies:
    0
    Views:
    629
    HopfZ
    Aug 28, 2006
Loading...

Share This Page