jQuery File Save As dialog for dynamic content
        Posted  
        
            by DS
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by DS
        
        
        
        Published on 2010-06-01T22:01:27Z
        Indexed on 
            2010/06/01
            22:03 UTC
        
        
        Read the original article
        Hit count: 596
        
Hi,
I've a servlet that is invoked via jquery ajax. The resulting XML is then transformed using XSL and displayed on screen. Now, the requirement is to either print or save this content to the local machine. The print portion is working fine but I'm stuck at the Save As part. How do I do this using jquery/javascript? I'm using IE8/XP.
I tried
document.execCommand('SaveAs');
on button click but it doesn't seem to work in IE8. It shows the alerts I put in till that point, but doesn't bring up the dialog box. What's going wrong here?
© Stack Overflow or respective owner