iFrameFormRequest 1.3.1

This class gives you a method to upload files 'the ajax way'. Attach the iFrameFormMethod to any form tag and you can upload files



Details

Author
Arian Stolwijk
Current version
1.3.1
GitHub
arian/iFrameFormRequest
Downloads
12049
Category
Request
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_:
    • Core/Class.Extras
    • Core/Element
    • Core/Element.Event
    • Core/Element.Style

How to use

var iFrame = new iFrameFormRequest(document.getElement('form'),{
    onRequest: function(){
        document.id('debug').set('text','start');
    },
    onComplete: function(response){
        document.id('debug').set('html',response);
    }
});

Or you can use it this way:

document.getElement('form').iFrameFormRequest({
    onRequest: function(){
        document.id('debug').set('text','start');
    },
    onComplete: function(response){
        document.id('debug').set('html',response);
    }
});

And the HTML

<form action="upload.php" method="post" enctype="multipart/form-data">  
    <input type="file" name="file" />   
    <input type="submit" value="uploadAjax" />  
</form>

<div id="debug"></div>

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus