Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all


I have a code to print content of page it works fine.But when i used editor control we get along with ajax toolkit,the print function not works.

my code is
C#
function printdiv(printpage)
 {
var headstr = "<html><head></head><body>";
var footstr = "</body>";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+footstr;
window.print();
document.body.innerHTML = oldstr;
return false;
}


How to change the code to be applicable to editor also.
Posted
Comments
Sandeep Mewara 1-Feb-11 5:26am    
You get any error? Javascript error? A yellow rectangle at bottom bar of browser?
thatraja 1-Feb-11 10:43am    
check with firefox control if you getting any error messages, if yes then include that in your question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900