Hai,
I had used 4 DIV's in my web page.
During print a particular DIV, there is a need to print value of one Text Box (Note: before print user will type something in Text Box) and I had placed some Check Box also. The check box also need to be printed with check or unchecked whatever condition.
For this purpose, I had used the following code;
The DIV is printing but without the value of Text Box.
Please help me to print the DIV with the value of Text Box and Check Boxes.
Thanks & Regards,
Guna
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 20, 2016, 7:11 PM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 14, 2016, 12:21 AM EST
Guna17 reputationPosted Jan 14, 2016, 12:27 AM EST
Guna17 reputationPosted Jan 14, 2016, 12:36 AM EST
{
var originalContents = document.body.innerHTML;
var inpText = document.getElementsByTagName("input")[0].value;
var printContents = document.getElementById("<%= Panel1.ClientID %>").innerHTML;
printContents += inpText;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 14, 2016, 1:18 AM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 14, 2016, 8:57 PM EST
Sunil Bharath2 reputationPosted Jan 18, 2016, 5:25 PM EST
alert(divElements);
Guna17 reputationPosted Jan 20, 2016, 7:09 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts