i have this auto-refresh script using jquery. i want the function to run only after user had click the submit button. When user click the submit button ffmpeg will convert the video and progress.php will retrieve the estimated time taken while waiting for ffmpeg to complete converting the video.
html form
<form action="upload.php" method="post" enctype="multipart/form-data">
<label for="file"><span></span></label>
<input type="file" name="file" id="videofile" />
<br/> Please enter video title:
<br/>
<input type="text" name="videoTitle" id="videoTitle" onkeyup="check()" />
<br />
<input type="Submit" id="Submit" value="Upload" disabled />
</form>
so far i had tried this code but its not working..
$("#submit").submit(function(event){
$("#submit").click(function(event){
$(document).ready(function(){
Jquery
//$(document).ready(function(){
$("#submit").click(function(event){
setInterval(function(){
$("#myDiv").load('progress.php')
}, 2000);
});
event.preventDefault()to block form from submitting, if that is what you want.