Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-15-2003, 01:49 PM   PM User | #1
frontline
Regular Coder

 
Join Date: Sep 2002
Posts: 143
Thanks: 0
Thanked 0 Times in 0 Posts
frontline is an unknown quantity at this point
pageBreakBefore style problem

Hello
im trying to create page breaks for printing ,im trying to do the pagebreaks with script that will attach the
style pageBreakBefore method on the fly after i create the div's i have something like that :
function int(){
var iTotalHeight = parseInt(document.all["ContainerTable"].offsetHeight);
var iWidth = 540;
var iDivideWith = 400;
var iResult = parseInt(iTotalHeight / iDivideWith) ;
if(!iResult)
iResult=1;
var i=iResult
var iTop = parseInt(0);
while(i){
mainDivElement = document.getElementById("mainDiv");
newNote = document.createElement("div");
newNote.setAttribute("id", "Print"+i);
newNote.style.width=iWidth;
newNote.style.height=iDivideWith;
newNote.style.border="1px solid blue";
newNote.style.position="absolute";
newNote.style.top=iTop;
newNote.style.left=0;
newNote.style.zIndex=10;
newNote.style.pageBreakBefore="always";
mainDivElement.appendChild(newNote);
i--;
iTop=parseInt(iTop+iDivideWith);
}
}


as you can see i expect the script to divide me the pages printing according the div's i invoke the script on body onload
but i dont get any response and it seams that the page ignore the pageBreakBefore?
is there is something wrong here?
im using IE 5.5 .
thanks
frontline is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:28 PM.


Advertisement
Log in to turn off these ads.