Solved

ajax get $_FILES values

Posted on 2011-03-13
8
1,022 Views
Last Modified: 2012-06-22
Hi,
I want an upload functionality using ajax on my website.
So, i wanted to know how to accept the values of $_FILES through Java-script.
as in this functionality i even want to save the text value but with other button.
So, one button would be for browse and another for saving text value which would be related to each other.
0
Comment
Question by:Insoftservice
  • 4
  • 4
8 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 35135365
0
 
LVL 15

Author Comment

by:Insoftservice
ID: 35135533
Hi,
@routinet

thx for ur comments but if u chk that it will submit the form and do the refresh which i don't want .
i want similar to uploadify.js.
but it does its work with single button which i dont want.
i hope u understand what eaxctly i want
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 35136253
Both of those examples are methods by which you can submit the file upload without refreshing.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 15

Author Comment

by:Insoftservice
ID: 35146862
hi,
i checked it and both requires refresh. just chk the status bar in there demo
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 35153702
I don't know what to tell you.  I use the same system on my own file uploader, and it uploads with a page refresh.  Perhaps you need to take a second (or third) look at your implementation.
0
 
LVL 15

Author Comment

by:Insoftservice
ID: 35154693
hi,

ur comments
"
I don't know what to tell you.  I use the same system on my own file uploader, and it uploads with a page refresh.  Perhaps you need to take a second (or third) look at your implementation."

itself says that it refreshes the page .
whereas i dont want to refresh my page.
u can check uploadify.js
http://www.uploadify.com/demos/
i want similar to it but it performs it action on one button ie browse.
whereas my requirement is to grab the image via one button and later save the grabbed image and some data with other button.
I hope u get my requirement
0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 500 total points
ID: 35162592
The very first line of the "Ajax File Upload" site (emphasis added):

>>> You might have seen Ajax File Uploading in some sites. The basic idea is to upload a file without refreshing the page.
>>> Some sites go even further by providing details on how much percentage is uploaded, etc. It is very easy to achieve
>>> this effect using javascript.

As I said, I use the same system, and it works perfectly, with no refreshing necessary.  If the page is still refreshing, it is because you are allowing the main form to actually submit to the parent page.  The form's target should be the hidden iframe.
0
 
LVL 15

Author Closing Comment

by:Insoftservice
ID: 35291940
Thx,
but i did with other method.
srry for delay
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question