is it possible to write a (java) script in a html page that automaticly uploads (ftp) a file from your hard disk to the ftp-server (when pressing on an "imaged-button")??
I tried everything but I don't manage in getting it working.
thanks.
Printable View
is it possible to write a (java) script in a html page that automaticly uploads (ftp) a file from your hard disk to the ftp-server (when pressing on an "imaged-button")??
I tried everything but I don't manage in getting it working.
thanks.
No, it isn't. Java applets shouldn't have access to files on your harddisk at all. Lets say someone makes such an applet which save everything in /mydocuments/ to some server once someone clicks on a button (why even bother to make a button?)... -huge- security violation.
Java programs can perform fileoperations, but Java Applets (the 'programs' or 'scripts' you use in webpages) can't.
As Guus said, applets run inside a "sandbox" on your computer, so that they don't have access to much. As Sun Microsystems says:
"Applets may wreak havoc in their own sandbox, but they cannot disrupt or affect any other sandboxes. Furthermore, restrictions may be placed on what the application can do within their own sandboxes. Thus, the jvm can allow untrusted applications to execute in a trusted environment, without fear of corruption or subterfuge. "
The link below not only includes info about the sandbox but other Java secuirty related info:
http://java.sun.com/marketing/collateral/security.html
too bat it isn't possible.
thanks for replying.
greetz
i cant say i fully understand what your trying to do but maybe this will help:
http://host.cdesystems.com/faq/asp_upload_component.htm
or this:
http://www.eggheadcafe.com/authorcod...s/20010226.asp
Whenever you have to touch the physical drive of your\remote server, know you have to use server side code. A form can request a file, and the file could very well be uploaded to the webpage, but javascript can't push the information (which resides in the Header) anywhere.
javascript runs on the client side unless specifically mentioned in code, <run-at server>, and even then there are far better languages to use server side, like perl,php,asp etc.
Tedob1, your first link was what I meant.
a lot of thanks, man.
you can use active X to upload file into somebody computers its posseble to run any proggy
peace