Re: Internet Explorer / Java Script
From: F.L. (FL_FEE_at_newsgroup.nospam)
Date: 12/20/04
- Next message: alan smith: "Re: A surprise discovery"
- Previous message: David C. Holley: "Re: Does Pocket PC 2003 or the latest vesion of CE support MS Access Data Access Pages"
- In reply to: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Next in thread: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Reply: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Dec 2004 14:10:20 +0100
I'm sorry Neil, but your "workaround" has nothing to do with catching the
return key: it simply copies text from one input field to another one.
There's no way to detect that someone hit return.
Thank you
Franz
"Neil Smith [MVP Digital Media]" <neil@nospam.com> schrieb im Newsbeitrag
news:82ads010bajrfo58nplk93cc3b7oi8a6ai@4ax.com...
> OK my mistake, sorry. I looked back more closely at the work I did
> with this. Here's a working workaround :
>
> ================================
>
> <html>
> <head>
> <title>Simulate keyup changes</title>
> <script language="javascript">
> // Set initial value to check against
> var curvalue="";
> function getTimeout() {
> dv=document.forms["keys"].send.value;
> df=document.forms["keys"].get;
> if (dv !=curvalue) {
> curvalue=dv;
> // Change value to current text box content
> df.value=dv;
> // Or use your own function here instead
> }
> // Repeat ever 50 millisec or interval of your choice
> window.setTimeout(getTimeout,50);
> }
> </script>
> </head>
>
> <body onload="getTimeout()">
>
> <form name="keys" id="keys">
> Input : <input type="text" name="send" id="send" size="12"
> maxlength="24" />
> <br />
> Output : <input type="text" name="get" id="get" size="12"
> maxlength="24" />
> </form>
>
> </body>
> </html>
>
>
> ================================
> Cheers - Neil
> On Mon, 20 Dec 2004 10:02:43 +0100, "F.L." <FL_FEE@newsgroup.nospam>
> wrote:
>
> >First of all: thanks for your detailed answer. About two years ago when I
> >was coding my forms, I once read that the submit button acts like the
> >default button in a regular Windows application dialog: pressing return
> >fires the default button. Well, now I know that this is only true for
forms
> >with one input field.
> >
> >But unfortunately, the "workaround" you provided in your first reply
doesn't
> >work: the "onKeyPress" event is not supported by PIE (Pocket Internet
> >Explorer):
> >
>
>http://groups.google.com/groups?hl=de&lr=&selm=%236htjjyUEHA.556%40tk2msftn
gp13.phx.gbl
> >
> >And if you have a look at the document mentioned ...
> >
> >http://www.microsoft.com/mobile/developer/technicalarticles/html.doc
> >
> >... you will see (caption "<INPUT TYPE=text> element/object") that PIE
only
> >supports the "onClick" event for input fields.
> >
> >Do you have any ideas?
> >
> >Thanks in advance,
> >
> >Franz.
> >
> >"Neil Smith [MVP Digital Media]" <neil@nospam.com> schrieb im Newsbeitrag
> >news:dvu0s0lmju2topi3ebqfsg6d1o4o9kaejo@4ax.com...
> >> That's not the "correct" bahaviour, it's the default behaviour for
> >> internet explorer on the desktop. You have become confused with what
> >> IE does and what the specification is for forms. Check this for clues
> >> : http://support.microsoft.com/default.aspx?scid=kb;en-us;298498
> >>
> >> "However, not all browsers behave the same way, and you may want to
> >> disable this behavior". As they say, this is IE which does this not
> >> "other browsers" in the browser culture.
> >>
> >> The default behaviour in desktop IE only takes place if there is one
> >> input type="text" form element to submit. Otherwise the browser falls
> >> back to the standard behaviour. This is why there are tutorials on
> >> www.irt.org using javascript to submit forms on enter which have
> >> multiple input elelents.
> >>
> >> For an excruciatingly detailed explanation of these differences see
> >> here http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html
> >>
> >> The correct specification as provided by W3C is under the tabindex
> >> section (down the bottom in green text) : `the "tab" key is used for
> >> navigation and the "enter" key is used to activate a selected element'
> >> http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.11.1
> >>
> >> The fact that pocket IE has no use for a tabindex is a side-effect of
> >> the pen-based navigation and compromises made there to make the
> >> browser usable.
> >>
> >> HTH
> >>
> >> Cheers - Neil
> >>
> >>
> >>
> >> On Wed, 15 Dec 2004 15:06:00 +0100, "F.L." <FL_FEE@newsgroup.nospam>
> >> wrote:
> >>
> >> >Well, that might work ... BUT: the problem is somewhere else! I could
> >strip
> >> >down my website and finally found the problem: the submit button works
if
> >I
> >> >only have one input field of type "text" -- it doesn't work if there
are
> >> >more!
> >> >
> >> >Pressing the return key after having entered something into either of
the
> >> >two input fields *won't* send the form. If you remove the second input
> >field
> >> >from the HTML code, it *does* works.
> >> >
> >> >So, why did this correct behaviour work in IE for Pocket PC 2002 and
why
> >> >doesn't it now in Windows Mobile 2003?
> >>
> >
>
- Next message: alan smith: "Re: A surprise discovery"
- Previous message: David C. Holley: "Re: Does Pocket PC 2003 or the latest vesion of CE support MS Access Data Access Pages"
- In reply to: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Next in thread: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Reply: Neil Smith [MVP Digital Media]: "Re: Internet Explorer / Java Script"
- Messages sorted by: [ date ] [ thread ]