473,404 Members | 2,137 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,404 software developers and data experts.

how to know where the file has been saved using a document.execCommand(saveAs).

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 file.

if not a direct way is there any work around way to find the location of the file saved?
Jan 28 '08 #1
7 4002
hi all,

i want to know if there is any to open a saveAs dialog without using execCommand.

my problem is that i want to create file(on his hard disk) with the name the user has entered in a text box and write some data to it.

problems i faced
1. i dont know the path where he has saved the file (if i use execCommand.)
2. even if a file is created , the html is saved in it.

so, if i know where the file is saved i can change its contents or if there is some other method by which i can do it.


please help....
Jan 28 '08 #2
acoder
16,027 Expert Mod 8TB
Supply the full path as the third parameter to execCommand - see this link.
Jan 28 '08 #3
acoder
16,027 Expert Mod 8TB
i want to know if there is any to open a saveAs dialog without using execCommand.
I've merged the two threads. See the link in the previous post. Please note though that "saveas" is only supported in IE.
Jan 28 '08 #4
Supply the full path as the third parameter to execCommand - see this link.

my question is not that. i want to allow the user to choose the location. i want to leave it to him where he want to store it. but if i know the location where he had stored it i can update it or so.

for that i need to know where he stored it.

so, my question is how to know the path/location which the user had choosen.

hope i am clear now.

awaiting a quick reply.
Jan 29 '08 #5
acoder
16,027 Expert Mod 8TB
I don't think that's possible. You could look into a vbscript/ActiveX solution, e.g. using FileSystemObject.
Jan 29 '08 #6
I don't think that's possible. You could look into a vbscript/ActiveX solution, e.g. using FileSystemObject.
but by using filesystemobject will we be able to popup a save as dialog ?

can u let me know how to use it?

or can we create any object of a saveAs dialog box so that we can use something like object.[method] so that we can have access to the path?
Jan 29 '08 #7
acoder
16,027 Expert Mod 8TB
I'm not really sure if you can popup a save as dialog using FSO.

Why not just make the changes before writing the file? Then there would be no need to modify the file and figure out where the file was saved.
Jan 29 '08 #8

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

Similar topics

12
by: rockocubs | last post by:
Is there a way in Javascript to bring up dialog boxes for both opening and then also saving a file?
4
by: patkohler | last post by:
Well I have been looking up this lovely method for the last few days. It works in IE still, probably because IE has not changed in the last few years, but it does not work still in Mozilla. In...
3
by: MrXs | last post by:
hi how do i save the contents of a axWebBrowser1 to a htm file ? i have a webpage loaded and would like to save it to my harddrive. also how do i open the file from my harddrive to open in...
7
by: Jeffrey A. Voigt | last post by:
?? Is there an easy solution to this? Thanks, - J
4
by: zaidalin79 | last post by:
Hi all, I am trying to add a button to my webpage that opens the save as dialog box, and allows the users to save the page (it is a form) as a word doc... I used this code which does work, but only...
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...
2
by: guilherme21922 | last post by:
I want to on a click button save a file: The file is in D:\FilesExport\Custumers.txt. I tried to do this but nothinh happens! ...
2
by: Sabine Dinis Blochberger | last post by:
Johnson Scaria John wrote: Reply and Follow-up to comp.lang.javascript -- Sabine Dinis Blochberger Op3racional www.op3racional.eu
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.