Northern Flame Posted April 16, 2008 Share Posted April 16, 2008 I want to create a script that will upload an image via ajax. I know how to do this regularly with PHP, but my question is if I can upload the file without the user having to click a "Submit" button. So my question is if i can do something like this: <script type="text/javascript" src="upload_ajax.js"></script> <!-- the above file will be a simple ajax script that will pass the data to a php script via $_GET --> <input type="file" name="image" size="25" /><br /> <button onClick="uploadImage()"> Upload Image </button> with the uploadImage() function I can pass the path of the image on the users computer, but can I then upload it as I normally would with PHP using $_FILES? Quote Link to comment Share on other sites More sharing options...
shankar23 Posted April 19, 2008 Share Posted April 19, 2008 Hi good try.. As per i know you shall use Iframe layer.. thanks Shang.. Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 20, 2008 Author Share Posted April 20, 2008 alright thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.