Ahhh IE, how you continue to suck...

The problem lies in the innerHTML property which is read only for
table and tbody elements.

http://msdn2.microsoft.com/en-us/library/ms533897.aspx


Cheers,
        Matt

On Nov 6, 5:00 pm, aadams <[EMAIL PROTECTED]> wrote:
> Hi Tunzis,  thanks for the reply!  Unfortunately this is exactly how I
> was doing it, though I was testing on IE7.  Maybe that was the
> difference?
>
> On Nov 6, 1:22 pm, Tunzis <[EMAIL PROTECTED]> wrote:
>
> > I had the same problem.  I was able to get it to work in IE 6 if the
> > table and tbody were already defined in the original html.  The html
> > before the update looks like this:
>
> > <table>
> >   <thead>
> >     <tr>
> >         <th>Session</th><th>ReportName</th><th>Status</th><th>User</
> > th><th>Customer</th><th>Printer</th>
> >     </tr>
> >   </thead>
> >   <tbody id="reportTable">
> >   <tr class='even'>
> >         <td colspan="7" style="white-space: nowrap;vertical-align:
> > bottom;"><strong><center>No reports status available</center></
> > strong></td>
> >   </tr>
> > </tbody>
> > </table>
> > <script type="text/javascript">
> >    updateReportStatusTable();
> > </script>
>
> > And then the javascript is like this.  The servlet returns the rows
> > (<tr>) that are to go inside the tbody.
>
> > function updateReportStatusTable() {
> >         var myAjax = new Ajax.Updater('reportTable','/app/
> > reports_status_table.do', {parameters: { userName: 'All' }, method:
> > 'post' });
>
> > }
>
> > Hope that helps!
>
> > On Nov 2, 12:27 pm, aadams <[EMAIL PROTECTED]> wrote:
>
> > > Just for the record Walter's suggestion touseul/li did the trick for
> > > this one.  If I had more complex tables though it wouldn't be as
> > > graceful.
>
> > > On Nov 2, 11:31 am, aadams <[EMAIL PROTECTED]> wrote:
>
> > > > 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 hateIE.
>
> > > > 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
> > > > > >tablethat usesAjax.Updaterto add rows to atable.  FF seems to be
> > > > > > ok with this but IE7 doesn't update thetable.  I'm using aTableas
> > > > > > thecontainer, which may be my problem but Ican'tseem 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:
>
> > > > > > == HTMLTable==
> > > > > > <table>
> > > > > > <tr>
> > > > > >    <td width="100%">
> > > > > >            <tablewidth="100%" id="rowContainer">
> > > > > >                    <tr>
> > > > > >                            <td>
> > > > > >                                    <span>Loading...</span>
> > > > > >                            </td>
> > > > > >                    </tr>
> > > > > >            </table>
> > > > > >    </td>
> > > > > > </tr>
> > > > > > </table>
>
> > > > > > <script type="text/javascript">
> > > > > >    newAjax.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 atableworks, 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 yourtabledoesn't have <thead> and
> > > > > <tbody> tags. Try adding those, and see if it helps.
>
> > > > > Otherwise, you may need tousea differentcontainer, 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 yourcontainerwidth.
>
> > > > > <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 thecontainer(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- Hide quoted text -
>
> > > - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to