jQupload
2012
May 05
May 05
|
DOWNLOAD jQuery Uploader v0.1 LICENSE |
DEMONSTRATION
NEWS
- 2010/02/16 jQupload v0.1 released.
DESCRIPTION
- Simple form submit plugin.
- Files can be upload through the plugin.
- Easy to integate to your application.
- Easy to define your own logic.
- jQupload tested with IE6, IE7, IE8, IE9, FF3, Opera, Safari4, Google Chrome2.
- Lightweight form uploader plugin – The source file is just 2k!
- Free and Free of charge under the MIT License.
DOCUMENTATION
Simple way to initialize the jQupload
-
<script type="text/javascript">
-
$(document).ready(function() { -
//initialize jQupload object
-
//the simple way, use default alert message and callback
-
$("#my_form").jqupload(); -
$("#my_form").jqupload_form(); -
});
-
</script>
Second way, use json object and set the message to a div/span
-
<script type="text/javascript">
-
$(document).ready(function() { -
//initialize jQupload object
-
//the simple way, use default alert message and callback
-
$("#my_form").jqupload({"output":"demo_message"}); -
$("#my_form").jqupload_form(); -
});
-
</script>
Advanced way, define your own logic to handle the return message
-
<script type="text/javascript">
-
$(document).ready(function() { -
//initialize jQupload object
-
//the simple way, use default alert message and callback
-
$("#my_form").jqupload({"callback":"myfunc"}); -
$("#my_form").jqupload_form(); -
});
-
</script>
Haw can I output HTML when send data with json?
$msg=’text to show in html tags doesn’t work’; $arr["message"]=$msg; echo json_encode($arr);
without html paragraph everithing is ok, but with html tags I have invalid character error when debuging javascript and can’t got it to work. Please help!!!
first, make sure your return from php work. $msg should have php error for the word “does’t”. second, make sure you have proper open and close tag, for example, if you miss the close tag for table structure, you would also receive errors