![]() |
inline table doesn't display changes
Hi all,
I am trying to update a span inside an inline table, and even though the DOM element is updated the table doesn't refresh - it goes blank. This happens only if Firefox, and it seems the problem is caused by the 'display:-moz-inline-box' style (see code at end). Does anyone know of a workaround for this? Thanks in advance, Aleko Paste, save, load into FF. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> .tbl { border:1px solid black; display:-moz-inline-box; /* without this, everything is fine */ } .browseBtn { background-color:#dedede; cursor:pointer; } </style> </head> <body> inline table: <table class="tbl" cellspacing="1" cellpadding="0"> <tr> <td width="200px" class="tblLabel"> <span id="label" name="label">Select...</span> </td> <td width="18px" class="browseBtn" onclick="document.getElementById('label').innerHTM L = 'hello'; return false;"> </span> </td> </tr> </table> </body> </html> |
Re: inline table doesn't display changes
aleko wrote:
> I am trying to update a span inside an inline table, and even though > the DOM element is updated the table doesn't refresh - it goes blank. > This happens only if Firefox, and it seems the problem is caused by > the 'display:-moz-inline-box' style (see code at end). Does anyone > know of a workaround for this? I have tried other ways like setting textContent or like setting firstChild.nodeValue but the span goes blank nevertheless so I don't know of a workaround. The code works fine with a Firefox 3.0 nightly so it seems there is a bug in Firefox 2.0 that has been fixed for 3.0. -- Martin Honnen http://JavaScript.FAQTs.com/ |
| All times are GMT. The time now is 02:28 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.