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