Does anybody know how to help me?
I am writing a perl function to print out reports and make them look nice and neat. I divide up the report into div tags (pages) and hide all of them except the first one. I then have a next and previous button that allows the user to navigate through the pages hiding and showing each page. I want to keep the flow of the page based on the visible div, so I set the div to relative and then make it visible. Also, I don't want the other div tags affecting the flow of the html page so I set them to absolute and then hide them.
This works fine in the latest version of Netscape but in the latest IE the flow of the document is perfect but the divs are not becoming visible when I set them to visible. Can anyone tell me why?
#This is a simplified demo of what I have
<style>
.reportPage{
position:absolute;
visibility:hidden;
margin-left:25%;}
</style>
and this is how I have the html page set up
<table>
<!--Top of page -->
</table>
<div id="page1" class="reportPage">
<table>
<!--Results go here-->
</table>
</div>
<div id="page2" class="reportPage">
<table>
<!--Results go here-->
</table>
</div>
etc...
<table>
Bottom of page
</table>
this is my javascript:
onload="
livePage = document.getElementById('page1');
livePage.style.position='relative';
livePage.style.visibility='visible';
"
function nextPage (){
livePage.style.position='absolute';
livePage.style.visibility = 'hidden';
reportPage++;
livePage =document.getElementById('page'+reportPage);
livePage.style.position='relative';
livePage.style.visibility = 'visible';
document.report.whatPage.value='Page '+reportPage+ ' of ' +totalPages;
}
Any help?
Thanks
I am writing a perl function to print out reports and make them look nice and neat. I divide up the report into div tags (pages) and hide all of them except the first one. I then have a next and previous button that allows the user to navigate through the pages hiding and showing each page. I want to keep the flow of the page based on the visible div, so I set the div to relative and then make it visible. Also, I don't want the other div tags affecting the flow of the html page so I set them to absolute and then hide them.
This works fine in the latest version of Netscape but in the latest IE the flow of the document is perfect but the divs are not becoming visible when I set them to visible. Can anyone tell me why?
#This is a simplified demo of what I have
<style>
.reportPage{
position:absolute;
visibility:hidden;
margin-left:25%;}
</style>
and this is how I have the html page set up
<table>
<!--Top of page -->
</table>
<div id="page1" class="reportPage">
<table>
<!--Results go here-->
</table>
</div>
<div id="page2" class="reportPage">
<table>
<!--Results go here-->
</table>
</div>
etc...
<table>
Bottom of page
</table>
this is my javascript:
onload="
livePage = document.getElementById('page1');
livePage.style.position='relative';
livePage.style.visibility='visible';
"
function nextPage (){
livePage.style.position='absolute';
livePage.style.visibility = 'hidden';
reportPage++;
livePage =document.getElementById('page'+reportPage);
livePage.style.position='relative';
livePage.style.visibility = 'visible';
document.report.whatPage.value='Page '+reportPage+ ' of ' +totalPages;
}
Any help?
Thanks