Why do forms contain unstyled divs?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Why do forms contain unstyled divs?

Stefan Schmiedl
The story behind this question:

I have a simple form:

(html form)
        defaultAction: [#submit out];
        with:
                [html text: 'Suche '.
                html textInput submitOnClick]];

It is rendered like this:

<form >
  <div>
    <input style="position: absolute; top: -100em;" type="submit">
    <input style="position: absolute; top: -100em;" type="text">
  </div>
  Suche  <input onclick="submit()" class="text" type="text">
  <div>
    <input class="hidden" type="hidden">
    <input class="hidden" type="hidden">
  </div>
</form>

I see that the implementors have taken steps to keep required elements
out of sight. Still, both above and below my form content, div's without
styles remain. Is there a specific reason for not specifying a hiding
style to the wrapping div instead/additionally to hiding the contents?

<form >
  <div class="hidden">
    <input type="submit">
    <input type="text">
  </div>
  Suche  <input onclick="submit()" class="text" type="text">
  <div class="hidden">
    <input type="hidden">
    <input type="hidden">
  </div>
</form>

Browser hacks? Evolutionary wart?

Regards,
s.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Why do forms contain unstyled divs?

Avi Bryant-2
On Fri, Apr 25, 2008 at 11:50 AM, Stefan Schmiedl <[hidden email]> wrote:

>  I see that the implementors have taken steps to keep required elements
>  out of sight. Still, both above and below my form content, div's without
>  styles remain. Is there a specific reason for not specifying a hiding
>  style to the wrapping div instead/additionally to hiding the contents?

Different browsers do very different things when you hit enter inside
a text input, and this is a  browser hack to ensure that the
defaultAction callback you have provided gets executed.  IIRC,
Internet Explorer will take the first "visible" submit button in the
form, which is why "hidden" doesn't work.

Avi
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Why do forms contain unstyled divs?

Stefan Schmiedl
On Fri, 25 Apr 2008 12:09:45 -0700
"Avi Bryant" <[hidden email]> wrote:

> On Fri, Apr 25, 2008 at 11:50 AM, Stefan Schmiedl <[hidden email]> wrote:
>
> >  I see that the implementors have taken steps to keep required elements
> >  out of sight. Still, both above and below my form content, div's without
> >  styles remain. Is there a specific reason for not specifying a hiding
> >  style to the wrapping div instead/additionally to hiding the contents?
>
> Different browsers do very different things when you hit enter inside
> a text input, and this is a  browser hack to ensure that the
> defaultAction callback you have provided gets executed.  IIRC,
> Internet Explorer will take the first "visible" submit button in the
> form, which is why "hidden" doesn't work.

Thanks for the clarification, Avi.

Tongue-in-cheek question: Any plans on building another web framework?

I learned to use IOWA a few years ago, probably right before you left
it for building Seaside, now I'm learning Seaside and ...

s.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Why do forms contain unstyled divs?

Avi Bryant-2
On Fri, Apr 25, 2008 at 12:15 PM, Stefan Schmiedl <[hidden email]> wrote:

>  Tongue-in-cheek question: Any plans on building another web framework?
>
>  I learned to use IOWA a few years ago, probably right before you left
>  it for building Seaside, now I'm learning Seaside and ...

Well, I do still actually *use* Seaside, even if I don't commit any
code, whereas I never used IOWA in production at all.

:)

Avi
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Why do forms contain unstyled divs?

Stefan Schmiedl
On Fri, 25 Apr 2008 12:30:26 -0700
"Avi Bryant" <[hidden email]> wrote:

> On Fri, Apr 25, 2008 at 12:15 PM, Stefan Schmiedl <[hidden email]> wrote:
>
> >  Tongue-in-cheek question: Any plans on building another web framework?
> >
> >  I learned to use IOWA a few years ago, probably right before you left
> >  it for building Seaside, now I'm learning Seaside and ...
>
> Well, I do still actually *use* Seaside, even if I don't commit any
> code, whereas I never used IOWA in production at all.

You missed something :-D

It's the best web framework I've encountered over in Rubyland. Very
nice for small and lean apps. Not clumsy like The Other Framwork Which
Shall Not Be Named In Polite Company .-)

s.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside