Thanks for the reply Walter.
I tried implementing the thead/tbody tags and it did not help. I'll
try your ul/li suggestion and see if all goes well. Man I hate IE.
On Nov 1, 7:34 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> On Nov 1, 2007, at 6:54 PM, aadams wrote:
>
>
>
>
>
> > Forgive me if this is a dumb question, but I'm trying to develop a
> > table that uses Ajax.Updater to add rows to a table. FF seems to be
> > ok with this but IE7 doesn't update the table. I'm using a Table as
> > the container, which may be my problem but I can't seem to find a way
> > to make the columns line up properly otherwise.
>
> > Here's an example of the code I'm using, the real code reads data from
> > the DB to return multiple rows:
>
> > == HTML Table ==
> > <table>
> > <tr>
> > <td width="100%">
> > <table width="100%" id="rowContainer">
> > <tr>
> > <td>
> > <span>Loading...</span>
> > </td>
> > </tr>
> > </table>
> > </td>
> > </tr>
> > </table>
>
> > <script type="text/javascript">
> > new Ajax.Updater('rowContainer', 'inc/ajax_test.htm', { method:
> > "get", evalScripts: true });
> > </script>
> > ====================
>
> > == inc/ajax_test.htm file ==
> > <tr>
> > <td width="500">
> > This is a test (random length data)
> > </td>
> > <td width="100">
> > <a href="somefile.htm">click me</a>
> > </td>
> > </tr>
> > ====================
>
> > Using a div instead of a table works, but the the columns then do not
> > line up properly.
>
> I seem to recall reading somewhere -- maybe on the Scriptaculous Wiki
> -- that this is a problem if your table doesn't have <thead> and
> <tbody> tags. Try adding those, and see if it helps.
>
> Otherwise, you may need to use a different container, maybe an
> unordered list containing sized (width) divs set to float next to one
> another. For example, I believe this construction would work:
>
> ul.faux_table {
> float: left;
> width: 800px;
> list-style-type: none;
> padding: 0;
> margin: 0;}
>
> ul.faux_table li {
> padding:0;
> margin: 0;
>
> }
>
> li div {
> float: left;
>
> }
>
> ,col1 {
> width: 100px;}
>
> .col2 {
> width: 200px;
>
> }
>
> ... whatever widths you want for the columns, as long as they add up
> to your container width.
>
> <ul class="faux_table">
> <li id="row_1"><div class="col1">Column 1 stuff here</div><div
> class="col2">Column 2 stuff here</div> ... </li>
> ...
> </ul>
>
> Floating the container (ul) left makes the floated divs stay in their
> own rows, and then you can either style the div or the li to get
> rules between rows or columns.
>
> Walter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---