The code of @tinyByte it's a possible solution.
I add other possibility:
<script>
$(document).ready(function(){
// Controll submit form event
$( "#myForm" ).submit(function() {
alert( "Handler for .submit() called." );
});
// Controll click by javascript
$( "#btSubmit" ).click(function(event) {
event.preventDefault(); // Stop default behavior for submit button.
$( "#myForm" ).submit(); // Manually run submit
});
});
</script>
View Form: (Add ids to the elements)
<form id="myForm" action="/dataset/submit" method="post" style="display:inline">
<input type="hidden" name="file" value="file">
<input type="submit" id="btSubmit" value="Complete submission" class="btn-green" title="Submit changes to file details."/>
</form>
Edited:
You can also handle the click event on the CHtml submit button adding a ID, like this:
CHtml::submitButton("Save", array('id' => 'btSubmit', 'class' => 'btn', 'name' => 'files', 'title' => 'Save the updates to these files'));