"Randy Webb" <> wrote in message
news:...
> Michael said the following on 11/7/2006 7:30 PM:
>> can anyone explain why I get an endless loop of alerts (alert - hit
>> enter - alert - hit enter etc) from the following script/page?
>> It works ok in IE, and works ok in FF if I use the mouse to click the
>> "ok", but not if I use the enter key....
>
> Because the Enter key triggers the onkeyup for the input (which is
> incorrect behavior to me).
>
> Why are you passing a string that is the ID of the input and then looking
> up that input with gEBI rather than just passing a reference to the field
> and it's value?
>
> --
> Randy
> Chance Favors The Prepared Mind
> comp.lang.javascript FAQ - http://jibbering.com/faq
> Javascript Best Practices -
> http://www.JavascriptToolbox.com/bestpractices/
Thanks for the reply Randy.
This was actually written by a fellow student, rather than me. I couldn't
figure out why it was behaving as it was and our tutor wasn't helping much
so I thought I'd ask here. I think this is probably a much cut own version
of a larger script, hence it seems a bit round about in its method.
So how does the keyup on the alert object cause the firing of the event
registered to the <input> object? Why are they not separate?
Thanks for your help
Regards
Michael