473,585 Members | 2,657 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

6 New Member
hi all,

i have a question related to document.execCo mmand(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 4016
chakriroxx
6 New Member
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 Recognized Expert Moderator MVP
Supply the full path as the third parameter to execCommand - see this link.
Jan 28 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
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
chakriroxx
6 New Member
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 Recognized Expert Moderator MVP
I don't think that's possible. You could look into a vbscript/ActiveX solution, e.g. using FileSystemObjec t.
Jan 29 '08 #6
chakriroxx
6 New Member
I don't think that's possible. You could look into a vbscript/ActiveX solution, e.g. using FileSystemObjec t.
but by using filesystemobjec t 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 Recognized Expert Moderator MVP
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
35571
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
11561
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 the Mozilla developers doc the 'SaveAs' command is not listed, but I have found instances in the past where developers had posted questions about it...
3
2774
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 the axWebBrowser1 box ? Thanks MrXs
7
10102
by: Jeffrey A. Voigt | last post by:
?? Is there an easy solution to this? Thanks, - J
4
8810
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 allows to save as a txt or html file... Is there any way to make it so that they can save it as a .doc file to be able to edit it later? ...
6
22953
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 board system using basic DHTML to keep all of my colleges up to date. I have successfully built functions to control the posting of messages, but...
2
5536
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! document.execCommand('SaveAs','1',"D:\\FilesExport\\Custumers.txt"); if i do :
2
1708
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
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8212
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6606
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.