[Seaside] The Joy of HTML (was Very wierd IACache problems)

Julian Fitzell seaside@lists.squeakfoundation.org
Thu, 18 Jul 2002 15:07:37 -0700


Tim Rowledge wrote:
> I did find the problem though and I think it must count as a bug in...
> well, something. I had the html as
> 
> html
> 	^'......
> 	<form sea:id="regenerateQuestion">
> 		<input type="submit" value="Regenerate Question">
> 		<table..... loads of stuff, including two of my subcompnents>
> 		</table>
> 	</form>
> 
> but something made me try moving the </form> up to above the table. Now
> it works just fine on netscape.... duh. Still works ok on Acorn. Err, I
> thought you could put stuff like tables etc inside forms? I'm doing it
> in other places with no apparent problems!
> <outerlimits>Wierd</outerlimits>

Hrm... the HTML spec allows for TABLE to be inside FORM.  In fact, it's 
your INPUT tag that violates the spec, but everyone puts inputs directly 
in the form.  They're supposed to go inside some block tag like a <p> or 
a <fieldset> or something... (don't get me started about the spec :)

The Seaside parser doesn't enforce any of those rules, it allows any 
block tag (except another form), inline tag, or script tag.  So not sure 
why moving that <table> had any effect except that, well, Netscape and 
tables...  don't get me started on that either :)

> Clearly this isn't actually directly related to the caches stuff.
> 
> I've found myself making trivial forms a lot as away to get sensible
> looking buttons easily. Maybe I'm missing something from going
> cross-eyed looking at the dismally unreadable stuff on W3C.org; is there
> a 'simpler' way to make action button analogues in html?
> 
> tim

Well, you can place <button>'s without a form I think, but you can't 
make them do anything.  I believe the only things that can submit 
(without javascript) are <a>, <form>, <area>, or <img ismap>.  So you 
can have an image inside an anchor or use an image with an image map. 
But that probably isn't any nicer than having a small form with a button 
in it :)

Julian

-- 
julian@beta4.com
Beta4 Productions (http://www.beta4.com)