I am creating a table dynamically based on the number of rows returned from the server using struts. The table is created properly and I am trying to get the height value on the created table using any of the following:
document.getElementById('elementId').offsetHeight
jQuery("#elementId").css('height')
jQuery("#elementId").height()
I have run my code using Chrome and they all return the proper height of the table. The issue I am having is with Firefox. Any of these run with Firefox is always returning a value of 0.
I have tried placing the code in a $(document).ready()
, $(window).load()
, and in a window.load = function(){}
call, but none of them are returning a value. When I run the code in Chrome it returns a value of 136 for the height and when I run the same code in Firefox, it returns a value of 0 every time.
Is there something I am missing? Any help would be greatly appreciated.