Johnny schrieb:
> hi,guys
> 
> i get a form in table by jquery.
> 
> if the form like this:
> 
> <table>
>  <form>
>  <tbody>....<tbody>
>  </form>
> </table>
> 
> The table does not display in firefox(i use ff2.0), but it's ok in IE.
> and i can find the table of dom from DOM inspector add-on,  it does
> exists!!
> 
> i try some lots of ways to find what happened. And last i find.
> 
> if html like this:
> <form><table><tbody>....<tbody></table> </form>
> 
> it can display in ff2.
> 
> note: it just happens when you get html in ajax, but it's okay
> accessing directly by ff2
> 
> I'm sorry my poor English:)
> Johnny 


<table><form> ... </form></table> is invalid HTML. Put that into a 
static page and test it on the W3C validator.

In a static page you can get away with that because the browsers tag 
soup parser will fix your bad HTML. It's another thing obviously if you 
try to append such broken HTML with JavaScript after the page has been 
loaded/rendered. Imagine you were a browser: You're expecting a tbody or 
tr element after the table has been opened but there comes a form 
suddenly - where to put it? After the table? Close the table immediatly 
and open the form? IE seems to be more error prone here but that doesn't 
matter.

So it's not a jQuery bug, the bug is your HTML itself. As you already 
found out, just use <form><table> ... </table></form> and you're fine.


-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to