Example JQuery event when posting Form using multipart/form-data

JQuery event to use once your form is fully posted to the server


$(document).ready(function()
{
$("#target_upload").load(function ()
{
//// Put in code to execute after the iframe is loaded or posted ////
});

});

Sample of your Form :-


<form id="uploadPhotoFrm" enctype="multipart/form-data" action="upLoaderPhoto.php" method="POST" onsubmit="return true;" target="target_upload">

<iframe id='target_upload' name='target_upload' src='' style='width:1px;height:1px;border:0'></iframe>

<li> <input id="uploadedfile" type="file" title="Upload a file to showcase your portfolio" size="20" name="uploadedfile"/>
</li>

<li> <input type="submit" name="subBtn" class="standardButton" value="Upload" onclick="uploadImageCmd();">
<input type="button" name="cancel" class="standardButton" value="Cancel" onclick="closeUploadImageCmd();">
</li>
</form>

Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm