Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript onsave event??

Status
Not open for further replies.

WildT

Programmer
Feb 24, 2005
20
US
I am writing a client/server application and users are going to be accessing server side documents via their web browser. I was wandering if there is any client side event like an "onsave" event so that i can capture when users go to "File > Save As".

I need this becouse i have a script that i am going to modify that goes into the clients machine and uploads files onto the server. In this scenerio, if the user is revising a server side document and clicks "File > Save As" i will prompt the user and ask if he/she would like to save the file on the server also. If they pick yes then i will overwrite the server side document with their local modified document.

Any ideas about how to get this to work or what event i can use?
 
What kind of documents will they be editing?

Adam

Whatever I feel like I wanna do, gosh!
 
word, excell,other microsoft office documents,text docs and that would atleast be the only ones that i would expect to be able to control becouse there are only so many types of documents that can open up in a browser, and if the document is opened up outside the browser then its all over anyways becouse i have no way to access what they are doing outside the browser without client side software wich is not an option in this case.
 
I think you might be out of luck using JavaScript for this. You may be able to embed macros in the MS Office documents that'll do what you want. I'd try forum68 or an application specific forum for help on that.

Another option may be to have them open the document from a shared directory using a UNC path or mapped drive. i.e. "\\125.23.32.1\word.doc". Then when they save the document, it would save back to the server. I wouldn't do that on an Internet server, though. Maybe an Intranet or some network where you know the people connecting to your server.

Adam

Whatever I feel like I wanna do, gosh!
 
ya, this app is basically being used for an extranet so im not all that worried about people screwing up the documents, atleast no more so then I am giving them access to a mapped drive accross the network (becouse they always screw stuff up!). but i think ive found a way to use an activeX control with vbscript that will let me do this so hopefully it will work :). thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top