By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Send file through Ajax

P: n/a
Hi,

I need to send a file that is selected from a input type = file html
control to the server through a ajax method.

Please help

Thanks & Regards
Miyuru Ratnayake

Oct 4 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 4 Oct 2005 03:07:23 -0700, mi****@gmail.com wrote:
I need to send a file that is selected from a input type = file html
control to the server through a ajax method.


What's an ajax method?

just submit to a hidden frame or iframe.

Jim.
Oct 4 '05 #2

P: n/a
Jim Ley said the following on 10/4/2005 6:07 AM:
On 4 Oct 2005 03:07:23 -0700, mi****@gmail.com wrote:

I need to send a file that is selected from a input type = file html
control to the server through a ajax method.

What's an ajax method?


Is it one of the ways you clean your floor? Or, was it a ship? I forget.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 4 '05 #3

P: n/a
In article <43*****************@news.individual.net>, ji*@jibbering.com
says...
On 4 Oct 2005 03:07:23 -0700, mi****@gmail.com wrote:
I need to send a file that is selected from a input type = file html
control to the server through a ajax method.


What's an ajax method?


It's the new name for an old technology.

--

Hywel
http://kibo.org.uk/
Oct 4 '05 #4

P: n/a
mi****@gmail.com wrote:
I need to send a file that is selected from a input type = file html
control to the server through a ajax method.


You can't.

Instead, submit the form to a hidden iframe.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Oct 4 '05 #5

P: n/a
mi****@gmail.com wrote:
I need to send a file that is selected from a input type = file html
control to the server through a ajax method.

While placing a file on the server is a routine activity,
the method you have in mind will not work.

If your going to use <input type="file" ...> , you'll
need a cgi,servlet or similar on the server to receive the file.
If you aquire th file in some other fashion , perhaps building it
with a javascript function . you might be able to use XMLHTTP
and "put" the file. I assume this latter instance is what you were
thinking of when you said "ajax"

--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Oct 4 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.