inline table doesn't display changes

A

aleko

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').innerHTML = 'hello'; return
false;">&nbsp;</span>
</td>
</tr>
</table>
</body>
</html>
 
M

Martin Honnen

aleko said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top