Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > inline table doesn't display changes

Reply
Thread Tools

inline table doesn't display changes

 
 
aleko
Guest
Posts: n/a
 
      04-07-2008
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;
cursorointer;
}
</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>
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      04-08-2008
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling <div> elements using display: inline-table Evertjan. Javascript 6 04-09-2009 07:05 PM
Tool which expands implicitly inline inline functions tthunder@gmx.de C++ 3 06-16-2005 12:54 AM
To inline or not to inline? Alvin C++ 7 05-06-2005 03:04 PM
External inline functions calling internal inline functions Daniel Vallstrom C Programming 2 11-21-2003 01:57 PM
inline or not to inline in C++ Abhi C++ 2 07-03-2003 12:07 AM



Advertisments