Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > creating a 'help' function

Reply
Thread Tools

creating a 'help' function

 
 
ross m. greenberg
Guest
Posts: n/a
 
      09-29-2007
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
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      09-29-2007
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
 
Reply With Quote
 
 
 
 
ross m. greenberg
Guest
Posts: n/a
 
      09-30-2007
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>
==================
 
Reply With Quote
 
Lee
Guest
Posts: n/a
 
      09-30-2007
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.


--

 
Reply With Quote
 
timsamshuijzen@gmail.com
Guest
Posts: n/a
 
      09-30-2007
On Sep 29, 11:20 pm, "ross m. greenberg" <(E-Mail Removed)>
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).


 
Reply With Quote
 
ross m. greenberg
Guest
Posts: n/a
 
      09-30-2007
"Lee" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...


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

 
Reply With Quote
 
Lee
Guest
Posts: n/a
 
      09-30-2007
ross m. greenberg said:
>
>IkxlZSIgPFJFTTBWRWxic3BhbXRyYXBAY294Lm5ldD4gd3Jvd GUgaW4gbWVzc2FnZSBuZXdzOmZk
>b2NpaDAxOXE3QGRybi5uZXdzZ3V5LmNvbS4uLg0KIA0KPiBPb mNlIHlvdSd2ZSBydW4gaW50byBh
>IGZldyBjYXNlcyB3aGVyZSB5b3VyIHNvbHV0aW9uIGRvZXNuJ 3Qgd29yaywNCj4gbWF5YmUgeW91
>J2xsIHJlYWxpemUgdGhhdCB0aGUgZWRpdG9yaWFsaXppbmcgd 2FzIHRoZSBtb3N0IGVmZmVjdGl2
>ZQ0KPiByZXNwb25zZSBhZnRlciBhbGwuDQoNCkNvdWxkIHlvd SBnaXZlIG1lIGEgZmV3IGV4YW1w
>bGVzIHdoZXJlIHRoaXMgc29sdXRpb24gZG9lcyBub3Qgd29ya z8gIA0KDQpXaGF0IHdvdWxkIGhh
>dmUgYmVlbiBhIHJlYWxseSBlZmZlY3RpdmUgd291bGQgaGF2Z SBiZWVuIGEgcmVzcG9uc2UgdGhh
>dCBzYWlkIHNvbWV0aGluZyBsaWtlICJoZXJlIGlzIGEgc29sd XRpb24gdGhhdCBkb2VzIHdoYXQg
>eW91IHdhbnQsIGV4Y2VwdCBpdCBkb2VzIG5vdCBmdW5jdGlvb iBwcm9wZXJseSBpbiB0aGlzIHNp
>dHVhdGlvbi4uLiINCg0KVGhhdCB3b3VsZCBtZWFuIHN1Y2ggY SBzb2x1dGlvbiB3b3VsZCBiZSBl
>bnRpcmVseSBhY3RpdmUgaWYgdGhlIGNpdGVkIHByb2JsZW1zI GNvdWxkIG5vdCBwb3NzaWJseSBh
>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.


--

 
Reply With Quote
 
ross m. greenberg
Guest
Posts: n/a
 
      09-30-2007
>
> 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

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


 
Reply With Quote
 
Erwin Moller
Guest
Posts: n/a
 
      10-01-2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> 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
 
Reply With Quote
 
Aaron Saray
Guest
Posts: n/a
 
      10-02-2007
On Sep 30, 11:31 am, "ross m. greenberg" <(E-Mail Removed)>
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" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
>
>
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How override ALL function calls? (Is there a "function call function"?) seberino@spawar.navy.mil Python 2 08-01-2005 12:38 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net Web Controls 0 06-01-2005 02:36 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net 0 06-01-2005 02:36 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Passing a C++ object's member function to a C function expecing a function pointer! James Vanns C++ 7 01-21-2004 02:39 AM



Advertisments