In article <b09c98a8.0402171845.723cef85@posting.google.com >,
alanchinese@yahoo.com enlightened us with...[color=blue]
> thank you for your reply.
> first of all, what did you mean "All events are script"? what's the
> difference between script events and non-script events?
>[/color]
Any browser event (onClick, onmousedoen, onkeyup, etc) fires script, if
the author tells it to. That is, onClick is by its very nature an event
that can either be handled by script or ignored. So telling it
"javascript
:" is redundant UNLESS this page is part of an ASP
application and the default language (IE only) is specified as VBScript
and you wanted it to be handled by javascript. However, most of the time
what you see is the opposite - the default is javascript but the author
wants to execute vbscript. So, it would be onClick="vbscript
:
btn_someprocedure"
[color=blue]
> the code i provided here, is to make "enter" key work as a "tab" key[/color]
Why? Because your users are all ancient?
I hope only YOUR users use this, because anyone else who surfs the net
will be confused as hell.
[color=blue]
> (just because all old green screen applications are using "enter"
> instead of "tab"; furthermore, if there are more than one buttons, it
> will confuse the users on which button they submit.) in the same
> function jsKeyEvent(..) i already make the up and down arrow
> working... but just can't make the "enter" working.[/color]
If you really want to prevent the enter key from submitting, you have to
catch it and stop it. This is with a keypress handler found easily via
Google.
[color=blue]
>
> my question is, if i press the "enter" key, how to waken the
> jsKeyEvent event handler, to decide which input box to focus on the
> next?[/color]
You'd have to give each textbox a tab order and somehow keep track of
which box focus was on and then set focus to the next when you catch the
enter key.
--
--
~kaeli~
Once you've seen one shopping center, you've seen a mall.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace