I want to open a ftp browser at client site so that he can upload files in ftp.
I am using window.open()
method to open the ftp in a child window.
var windowObjectReference = window.open("ftp://" + username + ":" + password + "@" + server,
_blank', toolbar=yes, location=yes, status=yes,
scrollbars=auto, copyhistory=no,
menubar=yes, width= 500px, height=500px,
left=300px), top=100px, resizable=yes' );
The ftp looks like this:
[1]: http://i.stack.imgur.com/T6WYg.jpg
now i want to track the user activity like directories he visited,and send the path to the jsp page how to do that...??
How to check if an opened browser window is closed or not in JavaScript? To check if an opened browser window is closed, you can use the closed property in referenced window object in JavaScript. The property returns a boolean true if the window is closed and false if the window is in the opened state.
open() function contains the URL string of a webpage, which you want to open. If you do not specify any URL in this function, it will open a new blank window (about:blank).
For security reasons, browser windows with different domains can't see each other (same origin policy). On top of that, the ftp
protocol doesn't support any kind of JavaScript which would allow you to track what the user does.
That leaves you with two options:
ftp://
directly, write a JSP which gives access to the files on the FTP server. That way, you can track anything that the user does.For solution #2, the files need to be on the web server or you need to use a Java library which can talk to an FTP server.
Note: The FTP client in the browser is probably implemented using HTML and JavaScript but all this code is hidden somewhere in the browser. So even though the display is HTML and JavaScript, you can't access it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With