On May 16, 1:25 am, "Miguel Beltran R." <yourpa...@gmail.com> wrote:
> Hi list
>
> Using Ajax.Updater to a <div> retrive the follow
>
> (Using firebug)
> <table border="1">    <tbody id="comprobacion_busqueda_resultado" class="
> resultado">
>       <form>
>          <tr id="ul4" combrobacion_id="4">
>           <td>2</td>
>          <td>
>              <input value="1"/>
>           </td>
>         </tr>
>       </form>
>    </tbody>
> </table>
>
> but no show nothing on screen , because <tr> is inside <form>
>
> If I use the same html code and load direct the page with FF show this
> <table border="1"> <form/>
>     <tbody>
>          <tr>
>                <td>
>                  <input value="1"/>
>               </td>
>               <td>2</td>
>          </tr>
>     </tbody>
> </table>
>
> FF  move <form> out from <tbody>
>

I'm not clear what you're saying, but I think it's that your HTML was
broken and you didn't expect FF to treat it the way it does. But
really, if your HTML is broken, you have no reason to expect a browser
to behave in any particular way: it might throw an error, it might
ignore the bits it doesn't understand, it might do its best to patch
it up (and its best might or might not be good enough to create a
valid structure). GIGO.

> If I made
> var el=$('id="comprobacion_busqueda_resultado');
> el.select('tr').each(function(trs){
>    el.appendChild(trs);
>
> });

I *think* that what you are trying to do is to say "I have given the
browser this faulty structure, and I am now trying to use the DOM API
to clean up the structure". But you cannot reliably do that, because
you have NO idea what structure (if any) the browser is holding. This
approach *cannot*  reliably work.

>
> this MOVE <tr> from <form> to <tbody>, but the <input> lost the relation
> with the <form>.
>
> I need show the data like excel, how can do it?

You need to get the structure right in the first place: Either put the
whole table in the form, or put the form inside a table element. If
you want <input>s in more than one table element, then you'll have to
put the whole table in the form.

Colin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to