Subesh Pokhrel's Blog – Magento Development Tips,PHP,Google Maps
PHP & Magento Tips & Tutorials

Posts Tagged ‘ fileupload ’

Today, while writing a code for AJAX file uploader, I was trying to do with [wiki]SALAJAX[/wiki]. But, with SALAJAX I could not manage to send the headers for $_FILES. So I thought of an alternative. And the alternative was to load the action page of the form on [wiki]IFrame[/wiki], whose display would be hidden and the work for uploading the file will be done on the background without refreshing the page. Yeha.. Its not [wiki]AJAX[/wiki], but it gives a user the feel of asynchronous working on the page. So, my code is Asynchronous Feel Without Javascript and XML (AFWJAX). What do think about this?
So, Here’s the code.The code below is for the form.

<form action="iframeinc.php" method="post" enctype="multipart/form-data" id="uploadform" target="iframe" name="uploadform">
 File:
  <input name="pic" type="file" id="pic" style="margin-right:50px;" />
  <br />
<input type="submit" name="Submit" value="Upload" /><br />
<iframe name="iframe" src="iframeinc.php" width="200" height="500" style="display:none;"> </iframe>
</form>

Continue reading “Ajaxified File Uploader Using IFrame” »

  • Share/Bookmark

Search engine optimization by SEO Design Solutions