473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Send file through Ajax

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
5 10512
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: chuck | last post by:
Hi, Firstly, I don't know if this is just and isolated thing with the prototype.js library or is a problem in general with ajax calls with a '+' character, so i am posting it here. I am...
11
by: afrinspray | last post by:
I get this error everytime I finish an AJAX post with http.send(null): Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: :: getReplyWindow :: line...
2
by: antonyliu2002 | last post by:
I am testing AJAX. I've downloaded the AJAX Extension and the CTP December package and installed on BOTH my development machine and the production server. Then I created a very very simple web...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
7
by: newlearner | last post by:
hi, On a test page i try to insert some values thru post method but the values which i send is not replaced in the url which i specify. I get the code found in the page and not the updated one. ...
5
by: Jimmy | last post by:
How can I do that? Is it possible to send a server request (i.e. GET) without refreshing the web page? Using Javascript? Or Ajax (i.e. AjaxAnywhere)? Or if there's a way (i.e. using...
4
by: rohitchawla | last post by:
i dont know in which forum to post it in as it has both servlets and javascript in it i have made an ajax request to server side to read the values of a cookie and then send these values to...
11
by: zanzo | last post by:
usually we create a url with parameters and values and send it via ajax to not loading page. Is there a way to not send variables in the url BUT using hidden variables?? I have a problem in my...
1
sid0404
by: sid0404 | last post by:
Hi I need to send data from my servlet to my html(which contains AJAX), so as per the motivation of the AJAX, this should be done without my webpage reloading / refresh. my code on the ajax...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.