How do I upload a file into using jQuery / AJAX
As I understand...
When passing an image/value to PHP
<form action="page.php" method="post" enctype="multipart/formdata"> <input type="text" name="box"/><input type="submit"/> </form>
if using jQuery
<form name="part"> <input type="text" name="box"/><input type="button" onclick="pass();"/> </form>
function pass()
{
$.post('page.php', {info:part.box.value})
}
How do I incorporate enctype=multipart/formdata in this js file?
=========
If its not possible, is there an alternative in pass data from a form plus uploading an image simultaneously?

New Topic/Question
Reply



MultiQuote





|