D
David C
I have an aspx page that displays a GridView and some buttons, etc. One of
the buttons is to print the web page but hides some controls first via the
following Javascript:
function printplanner()
{
document.getElementById("Calendar1").className = 'visno';
document.getElementById("LblCalendarInfo").className = 'visno';
document.getElementById("newmenu").className = 'visno';
document.getElementById("BtnShowCal").className = 'visno';
document.getElementById("BtnPrint").className = 'visno';
document.getElementById("BtnEmailPlanner").className = 'visno';
document.getElementById("BtnReturn").className = 'visno';
window.print();
document.getElementById("Calendar1").className = 'visyes';
document.getElementById("LblCalendarInfo").className =
'visyesred';
document.getElementById("BtnShowCal").className = 'visyes';
document.getElementById("BtnPrint").className = 'visyes';
document.getElementById("BtnEmailPlanner").className = 'visyes';
document.getElementById("BtnReturn").className = 'visyes';
return false;
}
This works fine in IE but not Firefox. I thought getElementbyId was common
to all browsers. Below is the css class for visno, if this helps.
..visno
{
display: none;
visibility: hidden;
}
How can I get it to work in Firefox (and others?)? Thanks.
David
the buttons is to print the web page but hides some controls first via the
following Javascript:
function printplanner()
{
document.getElementById("Calendar1").className = 'visno';
document.getElementById("LblCalendarInfo").className = 'visno';
document.getElementById("newmenu").className = 'visno';
document.getElementById("BtnShowCal").className = 'visno';
document.getElementById("BtnPrint").className = 'visno';
document.getElementById("BtnEmailPlanner").className = 'visno';
document.getElementById("BtnReturn").className = 'visno';
window.print();
document.getElementById("Calendar1").className = 'visyes';
document.getElementById("LblCalendarInfo").className =
'visyesred';
document.getElementById("BtnShowCal").className = 'visyes';
document.getElementById("BtnPrint").className = 'visyes';
document.getElementById("BtnEmailPlanner").className = 'visyes';
document.getElementById("BtnReturn").className = 'visyes';
return false;
}
This works fine in IE but not Firefox. I thought getElementbyId was common
to all browsers. Below is the css class for visno, if this helps.
..visno
{
display: none;
visibility: hidden;
}
How can I get it to work in Firefox (and others?)? Thanks.
David