|
In lugnet.admin.general, Mark Koesel writes:
> Yeah, they are basically the same. MSDN claims they are different, but they
> appear to function identically in IE5. As for the last character being cut
> off, that didn't happen to me in my test:
>
> http://www-personal.umich.edu/~koesel/FormTest.htm
Yeah, I didn't get the last character omission on yours, but you're doing
something I didn't do, which is to expressly trap for the enter key-- You
used "window.event.keyCode", which apparently is different in NN (I looked
briefly in O'Reilly's Dynamic HTML-- apparently it's a bit different for each
browser, but possible in each). So it wouldn't actually catch the enter key in
NN (I only used 4.05, though). The second form on your test apparetnly works
the same in both browsers, though... But the first was unsubmittable with NN!
The test I used is at:
http://www.suave.net/~dave/test.html
Mine doesn't actually use Javascript functions, though:
<input type=text ... on_______="this.form.submit()" ... >
> > What you might want is "onchange", but that has issues when more than 1
> > text field is within the form... As I recall, "onchange" resulted in:
> >
> > onchange w/ 1 text box:
> > - MSIE: Form is submitted when enter is hit
> > - NN: Form is submitted when enter is hit
> > onchange w/ 2 text boxes:
> > - MSIE: Form is NOT submitted when enter is hit, but it IS submitted
> > when focus is taken off the text box (Stupid? yes.)
> > - NN: Form is submitted when enter is hit
>
> I am not sure of your test conditions, but you may have been seeing cross
> talk from the default behavior. Anyway, the onchange event is not really
> meant to handle such things (though it may be made to do so in a pinch).
Hmm... well, I guess I can understand that "onchange" is meant primarily for
use on things like select lists and radio buttons, and not really for text
fields, but I think on a text field, this should probably be the expected
behavior... I'm not sure, though... admittedly, I'm still somewhat new to
javascript, etc. :)
> > Alternatively you could cheat and put ALL the entry fields into ONE form,
> > then use javascript to control what fields are input where (although that
> > causes no end of coding nightmares... You need to deal with all these
> > javascript tags on the entry fields, extra javascript functions, the
> > 'onsubmit' tag, etc. It's a lot of useless effort, but it CAN be made to
> > work if you're a masochistic coder!)
>
> Yeah, that's probably one of the most round-about ways to do it :)
The sad part is I actually DID it... We needed something a lot more complex
than it should have been (thanks to our product development department :) So we
ended up putting it together with Javascript... It's a *hideous* mess to look
at, but it actually works across browsers... (Of course we do "require" our
customers to have certain browser settings, etc., so we can more or less
guarantee that it'll work for them)
DaveE
FUT off-topic.geek (or maybe it should be .publish?)
|
|
Message is in Reply To:
![](/news/x.gif) | | Re: Search button
|
| "David Eaton" <deaton@intdata.com> wrote in message news:FrL7Ln.7vs@lugnet.com... (...) the (...) quickly!). (...) character (...) Yeah, they are basically the same. MSDN claims they are different, but they appear to function identically in IE5. As (...) (25 years ago, 17-Mar-00, to lugnet.admin.general)
|
131 Messages in This Thread: (Inline display suppressed due to large size. Click Dots below to view.)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|