[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Konqueror "feature"
From:       deltasoftware () t-online ! de (Thomas Strauss)
Date:       2001-06-20 17:32:21
[Download RAW message or body]

On Wednesday, 20. June 2001 13:42, Cristi Dumitrescu wrote:

> On Wednesday 20 June 2001 13:53, Thomas Strauss wrote:
> > On Wednesday, 20. June 2001 12:11, Cristi Dumitrescu wrote:
> > > Seems that there is another small bug in Konqueror. When I have a form
> > > that has no submit button and no action, but only an input field,
> > > hitting enter while the focus is on the input field will reload the
> > > page. The same action in IE or NN doesn't do anything.
> > >
> > > Example of html code triggering this:
> > > <form name="hg" method="post">
> > >     <input type='text' name='user' value=''/>
> > > </form>
> >
> > Netscape does the very same thing, as you can verify using a get url.
> >
> > This is, btw, correct: If you have only an input-text field, the browsers
> > usually replace the submit-button with the enter-key in the textfield.
> > IE/NS do it this way and I dont think it is standardized somewhere.
> >
> > You left out the action-url in your form-declaration, so the action gets
> > set to the current page. Form processing is defined as submitting the
> > encoded form-contents using the given method (post in your case, get in
> > mine) to the action url.
> >
> > So, in my opinion, this is exactly what is supposed to happen.
> >
> > Regards
> >    Thomas
>
> Hrm, this has very bad consequences in some cases. For example, I'm using
> some separate links with Javascript for processing the form data and
> sending it to some other page. As the pages are PHP and expecting some
> parameters, reloading of the same page generates errors in some cases.
> I think it's not normal to have the enter-key in a textfield "pointing" to
> an inexistent submit button, but then again, this may be only a matter of
> taste
>
> :)
>
> Of course, I will adjust the pages to work with a small onSubmit javascript
> that returns false.
> It's up to the maintainers to decide if this behaviour is ok or needs to be
> changed.

I did some tests to find out what happens when:

For Netscape there is a difference between form method=POST and form 
method=GET.
Konqueror shows consistent behaviour (if wrong or not doesn't matter right 
now...).

Netscape: POST-Form: Page Loads, onLoad Event fires. Pressing return does 
obviously nothing. Global variables are not modified.

Netscape: GET-Form: Page Loads, onLoad Event fires. Pressing return does 
reload the page, the form-input is appended to the new url.
Global variables are reset.

Konqueror Post and Get: Page Loads, onLoad Event fires. Pressing return does 
reload the page, the form-input is appended to the new url.
Global variables are reset.

As for IE, I dont know.

Regards
   Thomas

-- 
Thomas Strauß    | "He breathed in the chill kelp-and-salt scent of the beach;
LeipzigerStr 61  |  the intense familiarity of the scent triggered a million
66113 Saarbrücken|  memories at once, and he knew he was home."
+49-681-5892772  |                    (aus "Green Mars", Kim Stanley Robinson)




>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic