Firefox javascript problem
-
Hi all. I have a link on an html page that expands/collapses a section within a table. It works fine in IE except firefox. It show the expanded table directly below a "show more" link, and this works except in firefox, where it display the expanded control right at the bottom of the page. Does anyone know what could be wrong? Here is the javascript method to expand/collapse:
function ShowExpand(but,linkID) { var el = document.getElementById(linkID); if (el!=null) { if (el.style.display == "block") { el.style.display = "none"; } else { el.style.display = "block"; } } }
This is how i call the method:<span class="moreinfolink" onclick="ShowExpand(this,'AssPPlInfo'); return false;">(More Information)</span>
Is there anything i am doing wrong hich firefox is fussy about? Any help woule be greatly appreciated. M -
Hi all. I have a link on an html page that expands/collapses a section within a table. It works fine in IE except firefox. It show the expanded table directly below a "show more" link, and this works except in firefox, where it display the expanded control right at the bottom of the page. Does anyone know what could be wrong? Here is the javascript method to expand/collapse:
function ShowExpand(but,linkID) { var el = document.getElementById(linkID); if (el!=null) { if (el.style.display == "block") { el.style.display = "none"; } else { el.style.display = "block"; } } }
This is how i call the method:<span class="moreinfolink" onclick="ShowExpand(this,'AssPPlInfo'); return false;">(More Information)</span>
Is there anything i am doing wrong hich firefox is fussy about? Any help woule be greatly appreciated. Mmarky777 wrote:
AssPPlInfo
What sort of an element has this ID? If it's a DIV or other element that normally uses
display: block
then you should be fine. If it's a table (display: table
), a table row (display: table-row
), table cell (guess...), etc. you'll run into problems with things not displaying right. IE sorta handles this because older versions of IE didn't actually support table display styles.Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
marky777 wrote:
AssPPlInfo
What sort of an element has this ID? If it's a DIV or other element that normally uses
display: block
then you should be fine. If it's a table (display: table
), a table row (display: table-row
), table cell (guess...), etc. you'll run into problems with things not displaying right. IE sorta handles this because older versions of IE didn't actually support table display styles.Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
Hi, thanks for your help. It is a tbody element. For this element, what display mode would i use? Thanks again.