creating a 'help' function

R

ross m. greenberg

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
 
T

Thomas 'PointedEars' Lahn

ross said:
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
 
R

ross m. greenberg

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>
==================
 
L

Lee

ross m. greenberg said:
Just for the information's sake, a response that included just the below without

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.


--
 
T

timsamshuijzen

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

ross m. greenberg

Lee said:
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.
 
L

Lee

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.


--
 
R

ross m. greenberg

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.


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

Erwin Moller

ross said:
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
 
A

Aaron Saray

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

Gregor Kofler

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
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top