Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   inline table doesn't display changes (http://www.velocityreviews.com/forums/t935395-inline-table-doesnt-display-changes.html)

aleko 04-07-2008 11:34 PM

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;">&nbsp;</span>
</td>
</tr>
</table>
</body>
</html>

Martin Honnen 04-08-2008 12:46 PM

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 11:15 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.