DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   iframe file uploading (http://www.daniweb.com/forums/thread113738.html)

kevin wood Mar 13th, 2008 10:35 am
iframe file uploading
 
hello i am trying to get uploaded to a server using a hidden iframe so the page does not reload.

i have a upload.php page which resizes the file and remanes the file. What i thiink should happen is that the php file should be in the iframe and the submit button directs the information to this page. without the page reloading. the code i have keeps reloading the page which is not good.

the code i am using for the form is here

<form action="" enctype="multipart/form-data" method="post" target="target_upload">
<iframe id='target_upload' name='target_upload' src='upload.php' style='width:1px;height:1px;border:0'></iframe><input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
<label>Select File: </label>
<div>
<input id="upload" name="upload" size="30" type="file">

<input type="submit" value="Upload File">
</form>

can anyone show me where i have gone wrong because this code keeps reloadiing my page which is not what is meant to happen.


All times are GMT -4. The time now is 2:16 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC