Привожу код:
Код: Выделить всё
<form id="myForm" enctype="multipart/form-data" action="/index.php?r=site/myAction" method="post">
<label for="field1">Текст:</field>
<input name="field1" type="text" value="123"/>
<!--<label for="file1">Файл:</label>
<input type="file" name="file1"/>-->
<input type="submit" name="submit_button"/>
</form>
<?php
$this->widget('application.extensions.jqform.JqForm', array(
'formId'=>'myForm',
'options'=>array(
'beforeSubmit'=>'pre',
'success'=>'after'
)
));
?>
<script>
function pre(){
alert("Before!");
}
function after(){
alert("After!");
}
</script>
Есть идеи?