Welcome Guest Search | Active Topics | Sign In | Register

Javascript driven AJAXUploader Options
APA
Posted: Tuesday, June 10, 2008 1:54:37 AM
Rank: Newbie
Groups: Member

Joined: 3/25/2008
Posts: 2
Hi all,

I am using an ActiveX for editing local images. Once the user finished editing an image, I would upload the image to the server. That means the local filename is known by advance and is not retrieved by the AjaxUploader component "browse" button.
Is it possible from the client side to specify a local file for uploading and call then the AjaxUploader javascript method upload(). Here is what I tried without success:

Code: JavaScript
var eoInput = document.getElementById("AJAXUploader_i_0");
if (eoInput) {
   eoInput.value = "C:\temp\MyImage.bmp";
   var eo = document.getElementById("AJAXUploader");
   if (eo) eo.upload();
}


Thanks
eo_support
Posted: Tuesday, June 10, 2008 9:06:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It's impossible to upload a file without user intervention with JavaScript. None of the modern browsers will allow you to do that because that would allow people to write a page to grab user files without their consent.

In your case, since you already use ActiveX control, you may want to consider using ActiveX control to transfer files as well.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.