jquery - Illegally placed <form> makes table rows invisible ONLY when served via AJAX -


ok, i'm asking it, know. please bear me.

i have <form> embedded in between table row tags, this:

<table>   <tr>     <td>foo</td>   </tr>   <form>   <tr>     <td>bar</td>   </tr>   </form> </table> 

i know illegal placement of form tag, browsers i've tried allow anyhow. don't have control on design of code, please bear me.

when load page jquery , jquery ui.layout plugin (see http://layout.jquery-dev.net/index.cfm ), table row(s) enclosed form tag no longer rendered. assume because forms don't have display properties either jquery or ui.layout plugin forcing rows inherit lack of display.

firebug shows rows grayed out , indented 1 level below form tag, corresponds (lack of) display think. interestingly, when don't use of jquery stuff, firebug shows rows not indented, instead @ same level form tag encloses them (and of course not grayed out) -- oh noticed firebug doesn't show closing form tag @ in case.

i'm unsure if it's jquery, ui.layout plugin, or i've done javascript has caused this, , i'm still digging around, there's lot of code in libraries, i'd appreciate pointers if has any.

is there way prevent this, or possibly force table rows have display? maybe form tag needs display property placed on rows inherit it?

i'm big advocate of standards-compliant code, boss won't listen. please spare "fix code" comments if that's you've got. appreciate it, that's not i'm asking here.

it looks issue caused fact page being loaded via xmlhttprequest ("ajax") instead of being rendered statically (and may or may not firefox issue only). seems same this:

http://forums.mozillazine.org/viewtopic.php?f=25&t=645220&start=0&st=0&sk=t&sd=a

that thread didn't have resolution beside resolving malformed html. it's quite annoying browser render if passed via "normal" browser page request, not when requested asynchronously , fed dom via script.

ah well, buggy code begets buggy behavior, eh?

for lack of else (well, there few javascript-based ideas floating around out there (such http://federmanscripts.com/2010/01/12/form-and-table-row-nesting-workaround/ ), these don't suit context), i'm going solution proposed comment above user "mu short".


Comments