creating a 'help' function

Discussion in 'Javascript' started by ross m. greenberg, Sep 29, 2007.

  1. I'm trying to create a function in JavaScript using Dreamweaver8 such that when a user hits the ' F1' key when a text box is selected a separate "pop-up" window will open, with text of my choice.

    Does anybody have any pointers or even some source code? I use ASP on my server.

    Thanks!

    Ross
    ross m. greenberg, Sep 29, 2007
    #1
    1. Advertising

  2. ross m. greenberg wrote:
    > I'm trying to create a function in JavaScript using Dreamweaver8 such that when a user hits the ' F1' key when a text box is selected a separate "pop-up" window will open, with text of my choice.


    Please fix your ... err ... newsreader:

    http://www.insideoe.com/

    I strongly recommend using Thunderbird instead:

    http://www.mozilla.com/thunderbird/

    > Does anybody have any pointers or even some source code?


    http://www.brain4.de/programmierecke/js/tastatur.php

    Note that users do not take kindly on expected application behavior being
    altered by script authors.

    > I use ASP on my server.


    Irrelevant, keyboard event handling is client-side.


    HTH

    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
    Thomas 'PointedEars' Lahn, Sep 29, 2007
    #2
    1. Advertising

  3. Just for the information's sake, a response that included just the below without editorializing would have been more effective than any of the responses!

    ===============
    <head>
    <script>
    function d(plugh)
    {
    alert(plugh);
    return false
    }
    </script>
    </head>
    <html>
    <body onHelp="alert('The user is looking for help');d(' my own help function');return false">
    This event fires when the user presses the F1 key.
    </body>
    </html>
    ==================
    ross m. greenberg, Sep 30, 2007
    #3
  4. ross m. greenberg

    Lee Guest

    ross m. greenberg said:

    >Just for the information's sake, a response that included just the below without
    >> editorializing would have been more effective than any of the responses!


    Once you've run into a few cases where your solution doesn't work,
    maybe you'll realize that the editorializing was the most effective
    response after all.


    --
    Lee, Sep 30, 2007
    #4
  5. ross m. greenberg

    Guest

    On Sep 29, 11:20 pm, "ross m. greenberg" <>
    wrote:
    > I can't do the equivalent of "c=getch(); if c==F1 popup('hlp_acct')" ?


    You can detect for an F1 key down, but you cannot prevent the browser
    from displaying the Help window. Guess you need to choose another key
    (or use the onfocus/onblur tooltip method as advised).
    , Sep 30, 2007
    #5
  6. "Lee" <> wrote in message news:...


    > Once you've run into a few cases where your solution doesn't work,
    > maybe you'll realize that the editorializing was the most effective
    > response after all.


    Could you give me a few examples where this solution does not work?

    What would have been a really effective would have been a response that said something like "here is a solution that does what you want, except it does not function properly in this situation..."

    That would mean such a solution would be entirely active if the cited problems could not possibly arise.
    ross m. greenberg, Sep 30, 2007
    #6
  7. ross m. greenberg

    Lee Guest

    ross m. greenberg said:
    >
    >IkxlZSIgPFJFTTBWRWxic3BhbXRyYXBAY294Lm5ldD4gd3JvdGUgaW4gbWVzc2FnZSBuZXdzOmZk
    >b2NpaDAxOXE3QGRybi5uZXdzZ3V5LmNvbS4uLg0KIA0KPiBPbmNlIHlvdSd2ZSBydW4gaW50byBh
    >IGZldyBjYXNlcyB3aGVyZSB5b3VyIHNvbHV0aW9uIGRvZXNuJ3Qgd29yaywNCj4gbWF5YmUgeW91
    >J2xsIHJlYWxpemUgdGhhdCB0aGUgZWRpdG9yaWFsaXppbmcgd2FzIHRoZSBtb3N0IGVmZmVjdGl2
    >ZQ0KPiByZXNwb25zZSBhZnRlciBhbGwuDQoNCkNvdWxkIHlvdSBnaXZlIG1lIGEgZmV3IGV4YW1w
    >bGVzIHdoZXJlIHRoaXMgc29sdXRpb24gZG9lcyBub3Qgd29yaz8gIA0KDQpXaGF0IHdvdWxkIGhh
    >dmUgYmVlbiBhIHJlYWxseSBlZmZlY3RpdmUgd291bGQgaGF2ZSBiZWVuIGEgcmVzcG9uc2UgdGhh
    >dCBzYWlkIHNvbWV0aGluZyBsaWtlICJoZXJlIGlzIGEgc29sdXRpb24gdGhhdCBkb2VzIHdoYXQg
    >eW91IHdhbnQsIGV4Y2VwdCBpdCBkb2VzIG5vdCBmdW5jdGlvbiBwcm9wZXJseSBpbiB0aGlzIHNp
    >dHVhdGlvbi4uLiINCg0KVGhhdCB3b3VsZCBtZWFuIHN1Y2ggYSBzb2x1dGlvbiB3b3VsZCBiZSBl
    >bnRpcmVseSBhY3RpdmUgaWYgdGhlIGNpdGVkIHByb2JsZW1zIGNvdWxkIG5vdCBwb3NzaWJseSBh
    >cmlzZS4NCg0K


    The convention for posting in this newsgroup (most of USENET, actually)
    is to post in plain text, certainly not base64 encoded text.

    It's pointless to ask for a list of situations where some feature
    *doesn't* work. There are far too many browsers and browser versions.

    However, it's a Bad Idea to try to carry non-web expectations into
    web applications. Even if your environment ensures that all of your
    users will actually have an F1 key, they probably know better than
    to expect it to provide help in an HTML interface.

    If you're migrating a legacy application to the web, bite the bullet
    and make it work like a web application. It will be easier for you
    and your users in the long run.


    --
    Lee, Sep 30, 2007
    #7
  8. >
    > The convention for posting in this newsgroup (most of USENET, actually)
    > is to post in plain text, certainly not base64 encoded text.
    >
    > It's pointless to ask for a list of situations where some feature
    > *doesn't* work. There are far too many browsers and browser versions.
    >
    > However, it's a Bad Idea to try to carry non-web expectations into
    > web applications. Even if your environment ensures that all of your
    > users will actually have an F1 key, they probably know better than
    > to expect it to provide help in an HTML interface.
    >
    > If you're migrating a legacy application to the web, bite the bullet
    > and make it work like a web application. It will be easier for you
    > and your users in the long run.



    "Lee" <> wrote in message
    news:...

    >
    > The convention for posting in this newsgroup (most of USENET, actually)
    > is to post in plain text, certainly not base64 encoded text.
    >
    > It's pointless to ask for a list of situations where some feature
    > *doesn't* work. There are far too many browsers and browser versions.
    >
    > However, it's a Bad Idea to try to carry non-web expectations into
    > web applications. Even if your environment ensures that all of your
    > users will actually have an F1 key, they probably know better than
    > to expect it to provide help in an HTML interface.
    >
    > If you're migrating a legacy application to the web, bite the bullet
    > and make it work like a web application. It will be easier for you
    > and your users in the long run.
    >
    >
    > --
    >



    Sorry, I wasn't aware I was sending stuff out in base64!

    It is reasonable to expect future users to have an F1 key -- querying a user
    group that represents about 90% of my expected users about what
    functionality they need/want is where I got the F1 requirement to begin with
    in the first place. I asked, they told me what they want.
    ross m. greenberg, Sep 30, 2007
    #8
  9. ross m. greenberg

    Erwin Moller Guest

    ross m. greenberg wrote:
    >> The convention for posting in this newsgroup (most of USENET, actually)
    >> is to post in plain text, certainly not base64 encoded text.
    >>
    >> It's pointless to ask for a list of situations where some feature
    >> *doesn't* work. There are far too many browsers and browser versions.
    >>
    >> However, it's a Bad Idea to try to carry non-web expectations into
    >> web applications. Even if your environment ensures that all of your
    >> users will actually have an F1 key, they probably know better than
    >> to expect it to provide help in an HTML interface.
    >>
    >> If you're migrating a legacy application to the web, bite the bullet
    >> and make it work like a web application. It will be easier for you
    >> and your users in the long run.

    >
    >
    > "Lee" <> wrote in message
    > news:...
    >
    >> The convention for posting in this newsgroup (most of USENET, actually)
    >> is to post in plain text, certainly not base64 encoded text.
    >>
    >> It's pointless to ask for a list of situations where some feature
    >> *doesn't* work. There are far too many browsers and browser versions.
    >>
    >> However, it's a Bad Idea to try to carry non-web expectations into
    >> web applications. Even if your environment ensures that all of your
    >> users will actually have an F1 key, they probably know better than
    >> to expect it to provide help in an HTML interface.
    >>
    >> If you're migrating a legacy application to the web, bite the bullet
    >> and make it work like a web application. It will be easier for you
    >> and your users in the long run.
    >>
    >>
    >> --
    >>

    >
    >
    > Sorry, I wasn't aware I was sending stuff out in base64!
    >
    > It is reasonable to expect future users to have an F1 key -- querying a user
    > group that represents about 90% of my expected users about what
    > functionality they need/want is where I got the F1 requirement to begin with
    > in the first place. I asked, they told me what they want.
    >
    >


    Hi,

    Never let your customers desires get in the way. ;-)
    They can 'demand' that you make it F1, but it doesn't make sense.
    It is like demanding that pressing a 'power down' button on a webpage
    shuts down your computer.

    Simply offer the help in another way: Don't use F1 for this.

    You are asking for problems because most browsers have their own
    behaviour defined for F1.
    Why don't you make a small ? everywhere on the page where you have help
    available?
    When somebody presses the ? you popup a nicely formatted helpwindow.


    Regards,
    Erwin Moller
    Erwin Moller, Oct 1, 2007
    #9
  10. ross m. greenberg

    Aaron Saray Guest

    On Sep 30, 11:31 am, "ross m. greenberg" <>
    wrote:
    > > The convention for posting in this newsgroup (most of USENET, actually)
    > > is to post in plain text, certainly not base64 encoded text.

    >
    > > It's pointless to ask for a list of situations where some feature
    > > *doesn't* work. There are far too many browsers and browser versions.

    >
    > > However, it's a Bad Idea to try to carry non-web expectations into
    > > web applications. Even if your environment ensures that all of your
    > > users will actually have an F1 key, they probably know better than
    > > to expect it to provide help in an HTML interface.

    >
    > > If you're migrating a legacy application to the web, bite the bullet
    > > and make it work like a web application. It will be easier for you
    > > and your users in the long run.

    > "Lee" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > The convention for posting in this newsgroup (most of USENET, actually)
    > > is to post in plain text, certainly not base64 encoded text.

    >
    > > It's pointless to ask for a list of situations where some feature
    > > *doesn't* work. There are far too many browsers and browser versions.

    >
    > > However, it's a Bad Idea to try to carry non-web expectations into
    > > web applications. Even if your environment ensures that all of your
    > > users will actually have an F1 key, they probably know better than
    > > to expect it to provide help in an HTML interface.

    >
    > > If you're migrating a legacy application to the web, bite the bullet
    > > and make it work like a web application. It will be easier for you
    > > and your users in the long run.

    >
    > > --

    >
    > Sorry, I wasn't aware I was sending stuff out in base64!
    >
    > It is reasonable to expect future users to have an F1 key -- querying a user
    > group that represents about 90% of my expected users about what
    > functionality they need/want is where I got the F1 requirement to begin with
    > in the first place. I asked, they told me what they want.


    I understand your frustration. I have a project rolling around at
    work where we have to migrate AS400 green screen applications to the
    web. The normal navigation keys are F1, F3, F12, etc. I face the
    same requests... so I know WHY you're asking.

    You might try making a clear case / argument again against this
    feature. For example, show them what F1 does NOW in the browser. I
    also like all of the onscreen tool tip ideas everyone has been
    suggesting. One user brought up an Alt-1 instead of an F1 key... but
    they didn't want to do that (whew). At any rate, I would suggest that
    you try to find a different way to accomplish the help window.
    Aaron Saray, Oct 2, 2007
    #10
  11. ross m. greenberg meinte:

    > It is reasonable to expect future users to have an F1 key -- querying a user
    > group that represents about 90% of my expected users about what
    > functionality they need/want is where I got the F1 requirement to begin with
    > in the first place. I asked, they told me what they want.


    A-ha. You asked the wrong question.

    Make clear, that it won't and can't be F1 (it's like asking whether they
    prefer colors on their monochrome displays). And then offer feasible
    alternatives.

    Users tend to want what they are used to - even if their situation could
    be bettered.

    Gregor


    --
    http://www.gregorkofler.at ::: Landschafts- und Reisefotografie
    http://www.licht-blick.at ::: Forum für Multivisionsvorträge
    http://www.image2d.com ::: Bildagentur für den alpinen Raum
    Gregor Kofler, Oct 2, 2007
    #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. Ravi Ambros Wallau
    Replies:
    0
    Views:
    4,085
    Ravi Ambros Wallau
    Jun 1, 2005
  2. Java and Swing

    Help creating extension for C function

    Java and Swing, Oct 7, 2005, in forum: Python
    Replies:
    10
    Views:
    2,004
    Java and Swing
    Oct 11, 2005
  3. Mark Livingstone

    Help creating Tiger hash function in Python

    Mark Livingstone, May 7, 2007, in forum: Python
    Replies:
    1
    Views:
    383
    Vyacheslav Maslov
    May 7, 2007
  4. Guest
    Replies:
    0
    Views:
    280
    Guest
    Nov 22, 2007
  5. Ravi Ambros Wallau
    Replies:
    0
    Views:
    306
    Ravi Ambros Wallau
    Jun 1, 2005
Loading...

Share This Page