Hi Guys,
I have a page that is broken up into sections. When you click the 'next' button, the current section is set to display:none and the next section is set to display:block. The code is as follows:
This works great in IE, however in firefox I get a large blank whitespace underneath the new section. It looks as if the display:none is just making it invisible instead of not rendering it at all.
Here comes the weird bit. When I un-comment that "alert('stuff');" it works fine! I can only assume that firefox needs a bit of time to render the display:none correctly?
Thanks for any Ideas.
Regards,
Keyper
I have a page that is broken up into sections. When you click the 'next' button, the current section is set to display:none and the next section is set to display:block. The code is as follows:
Code:
document.getElementById('form_section_'+sectionnum).style['display'] = 'none';
//alert('stuff');
if(direction=='next')
{
sectionnum=(sectionnum+1);
} else if(direction=='prev')
{
sectionnum=(sectionnum-1);
}
document.getElementById('form_section_'+sectionnum).style['display'] = 'block';
This works great in IE, however in firefox I get a large blank whitespace underneath the new section. It looks as if the display:none is just making it invisible instead of not rendering it at all.
Here comes the weird bit. When I un-comment that "alert('stuff');" it works fine! I can only assume that firefox needs a bit of time to render the display:none correctly?
Thanks for any Ideas.
Regards,
Keyper