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

List:       kfm-devel
Subject:    Re: HTML forms
From:       Lars Knoll <Lars.Knoll () mpi-hd ! mpg ! de>
Date:       2000-04-10 18:54:40
[Download RAW message or body]

On Mon, 10 Apr 2000, Waldo Bastian wrote:
> I'm trying to store the state of a form in Konqy's history. So that when you 
> fill out a form, go back and then forward again, what you have typed isn't 
> lost.
> 
> I had a look at HTMLInputElement and its render objects, and had a look at 
> the DOM and HTML 4.0 spec. 
> 
> What I intend to do is that after an input element is created and its 
> "initial value", according to the DOM, is set, I set its value to the value 
> stored in the history.

Sounds fine.
> 
> If I understand the current code correctly, I could do that by calling 
> RenderFormElement->setValue(). However, that would mean that I change the 
> "inital value" as well. Shouldn't the RenderFormElements store the "initial 
> value" in addition to the actual "value"? 

IMO it should be enough to store the initial value in the DOM element. 

> Currently HTMLInputElement::setDefaultValue() and 
> HTMLInputElement::setValue() both set the same thing.

They should be different.
> 
> The difference becomes visible when you "reset" the form. In that case the 
> "initial values" are supposed to be used.

Feel free to fix it. In my oppinion one should store the default value 
in the DOM element and the setting and retrieveing of the actual value
can be done by querying the renderObject.

> *hm* Something else: RenderTextArea calls reset() from within layout(). That 
> means that resizing a page resets the textarea. (render_form.cpp:796) 
> RenderSelect calls reset() and layout() from within close(). Should 
> RenderTextArea do the same?

I would think so. 

Dirk Mueller did most of the form stuff in the last time, so you should
perhaps also ask him.
> 
> Cheers,
> Waldo
> --
> Trying to find my way in khtml :-)

Welcome back to khtml hacking ;-)

Lars
-- happy more and more people (re-)start working on khtml :-)

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

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