css - Printer Friendly page not working with IE8 -


i m trying pickup contents of div , open in new window using window.open user can print printer friendly page. have got code somewhere on net , made modifications. below code snippet

function printpage() {       var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";        disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25";       var content_vlue = document.getelementbyid("memo_data").innerhtml;       var somestyle = '<style type="text/css"> #memotxt p {padding:0 0 0 0;margin:5px 0 0 0;}</style>';      var docprint=window.open("","sa",disp_setting);     docprint.document.open();    docprint.document.write('<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>inter office memo</title>');    docprint.document.write('<link type="text/css" rel="stylesheet" href="../../content/style.css"');    //docprint.document.write(somestyle);    docprint.document.write('</head><body><fieldset style="border:none;"><div class="memo-report-top"');              docprint.document.write(content_vlue);              docprint.document.write('</div></fieldset></body></html>');     docprint.document.close();     docprint.focus();        } 

when open page in firefox works way supposed when open page in ie8 , press print button triggers printpage() function. new window pops ugly looks. have called css file in printer friendly page when examine in ie8 developer tool shows me css properties applied on body , fieldset. rest of properties not there.
suggestions , highly appreciated

the div tag left open in following code line

docprint.document.write('</head><body><fieldset style="border:none;"><div class="memo-report-top"'); 

closing resolved problem ur input
regrds
adeel


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -