Forum Moderators: open

Message Too Old, No Replies

Can I save a remote window file using javascript?

saving window data via javascript.

         

tommytx

2:43 am on Dec 18, 2003 (gmt 0)

10+ Year Member



can I save a remote window via javascript.

Is there a way to save a file to disk that has been loaded into a window by a remote javascript.

Bottom line here is what I need to do.
1. Load a URL into a Remote window using remote javascript. (that works ok)
2. Save the file to disk using the remote javascript command. (How?)

The data is being loaded into the remote window via asp files from the web and the files do not even show up as htm or asp in the windows internet temp file other wise I could get them there. I know how to save htm asp etc from windows internet temp files.

Currently following the remote loading of each page, I have to do the following after each page loads:
click file... click select all...click copy and save to a file the copied data.
However I want to automate it. I guess I could write a wsh (windows script file) to do the job, but I hope there is some way to do it in javascript.

The remote control works great to present the data in the window. what I need is a command such as:

mywin.document.save.mywin Some command that will save the file that was loaded into the remote window. Then the remote could order load next page and save.

Updated change to original:
Actually to be more precise, I don't want to capture the window contents, I simply want to save the file that is loaded into the window.(Also I only need the text part as I don't need the graphics) . The file does not show up in the windows temp internet file at all. If it showed there, I could copy it there.

Can anyone help.

Thanks
tom

Purple Martin

6:20 am on Dec 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't do file operations with JavaScript, for security reasons. The best you can do with JavaScript is write a cookie (assuming the user's browser lets you), and there's a limit to how much information a cookie can hold.

If you use a server-side script (such as php, asp, jsp etc) you could save the contents of the file to a database or a file on the server.