View Single Post
  #1 (permalink)  
Old June 15th, 2007, 01:31 AM
arnabghosh arnabghosh is offline
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Show/ Hide image while saving file.

Hi All,

I have an asp report page which has options to save the report as html & print the page. Both these are done by javascript by clicking the 2 images for save & print. In the case of Saving the file I have tried using "style = display:none;" with the Save img with javascript ExecCommand('SaveAs'). But this does not help. I can see the outline of the 2 images in the .htm file that I have saved. I have to save the file without the images. How can I achieve this. The following is the code that i have used:

-----------------------------------------------------------------
function openSaveReportDialogue()
{
    document.getElementById("SaveImg").style.display = 'none';
    document.getElementById("PrintImg").style.display = 'none';
    SaveReport();
}
function SaveReport()
{
    document.execCommand('SaveAs',1,'PASSReportMain');
    document.getElementById("SaveImg").style.display = 'block';
    document.getElementById("PrintImg").style.display = 'block';
}
-------------------------------------------------------------

The function openSaveReportDialogue() is called from the Onclick of the save image.


Pls help!!!!
Reply With Quote