I am using Uploadify and am having problems submitting a form to uploaded1.php after upload, it literally doesn’t submit to there, here is the code;
<script type="text/javascript" src="uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="uploadify/swfobject.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : 'uploadify/uploadify.swf',
'script' : 'uploaded1.php',
'cancelImg' : 'uploadify/cancel.png',
'folder' : '/uploads',
'onAllComplete' : function(event,data) {
document.getElementByID('someForm').submit();
}
});
});
</script>
</head>
<body>
<form id="someForm" action="someFile.php" method="post">
<input name="someField" type="text" />
<input id="someID" name="someName" type="file" />
<input onclick="$('#someID').uploadifyUpload()" type="button" value="Submit" />
</form>
How can i can that code to submit the form after? People might only know if they have worked with Uploadify before.
You need to put:
in your
<form>tag for upload to work.