F
fredd00
Hi
I have an aspx page that has a datagrid and a print button
i have a javascript function :
function PrintPage(){
if (window.print) {alert('print');window.focus(); window.print(); }
else {alert('This script does not work in your browser');}
//history.back();
//return false;
}
on the print buton click i have
private void btnPrint_Click(object sender,
System.Web.UI.ImageClickEventArgs e) {
pnlTopButtons.Visible = false; // hide some buttons
pnlPrintButtons.Visible = false;// hide some buttons
pnlUsdQty.Visible=false; // hide some buttons
Page.RegisterStartupScript("jsPrint","<script
language=JavaScript>javascript
rintPage();</script>");
}
the thing is :
<script language=JavaScript>javascript
rintPage();</script>
is in the page , is the last thing before </form>
the javascript is being called, the alert is fired but not the print
part of the script , no printer dialog box , but in firefox the dialog
box is being displayed.
is it a bug with IE ?, is there a work around ?
thanks i really need this
I have an aspx page that has a datagrid and a print button
i have a javascript function :
function PrintPage(){
if (window.print) {alert('print');window.focus(); window.print(); }
else {alert('This script does not work in your browser');}
//history.back();
//return false;
}
on the print buton click i have
private void btnPrint_Click(object sender,
System.Web.UI.ImageClickEventArgs e) {
pnlTopButtons.Visible = false; // hide some buttons
pnlPrintButtons.Visible = false;// hide some buttons
pnlUsdQty.Visible=false; // hide some buttons
Page.RegisterStartupScript("jsPrint","<script
language=JavaScript>javascript
}
the thing is :
<script language=JavaScript>javascript
is in the page , is the last thing before </form>
the javascript is being called, the alert is fired but not the print
part of the script , no printer dialog box , but in firefox the dialog
box is being displayed.
is it a bug with IE ?, is there a work around ?
thanks i really need this