473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to open "SaveAs" dialog box in Firefox browser?

Hi,

Am unable to open javascript SaveAs dialog box in Firefox browser. Following is the script,

<a href="javascript:void(0);" onclick="document.execCommand('SaveAs',false,'*.xy z');">Save this page</a>

The above script works fine in IE. Can anyone please let me know how do I make the SaveAs dialog box open in Firefox browser.

Thanks,
Sanjay
Sep 18 '06 #1
2 10877
acoder
16,027 Expert Mod 8TB
execCommand("saveas") is not supported in Firefox.
May 13 '08 #2
pronerd
392 Expert 256MB
It is generally a bad idea to try and include direct local access as part of your web app program design. There are a lot of restrictions on doing local access, and for good reason. The execCommand() function only works in IE, and only if the user's security settings are low enough.

If you have access to the server side logic you can send a request for the file to the server, and then have the server set the HTTP Response MIME type to a made up value like "application/unknown" that will get the browser to open a dialog box to save the file.
May 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: lir | last post by:
Hi, I am trying to save a fram in a page using the execCommand("saveas") the html is save currectly but I can not save the gif on that page. How can I save the fram with the gif via...
7
by: Jeffrey A. Voigt | last post by:
?? Is there an easy solution to this? Thanks, - J
0
by: OutdoorGuy | last post by:
Greetings, I have the code below where I am instantiating Excel and then attempting to the save the new workbook (as "Test.xls"). However, on the line of code that attempts to save the...
3
Coldfire
by: Coldfire | last post by:
Hello, The issue is: I have a webpage that displays image in img tag while taking its src from a remote url ( dynamically). Now, my client want this functionality to ask for "Save at any location"...
4
by: GavReynolds | last post by:
Hi All! I am using Javascript to export some content in a popup (in this case, just 5 simple words) to a text file. This works fine and the user can save the text file. Upon opening the file,...
6
by: mrobinson86 | last post by:
Hey guys, wondered if anybody could help me out with a pretty simple piece of code that has been driving me crazy for the past few days? I am trying to create a client side self sustaining message...
7
by: chakriroxx | last post by:
hi all, i have a question related to document.execCommand(saveAs). i need to know the path of the file selected by the user in the saveAs dialog box. i need to make some changes to the saved...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.