Problem with jQuery Form Plugin
I have problem with jQuery Form Plugin. When I debug this in firefox there are no errors and warnings.
I see loader but code after it doesn't execute (action.php don't execute I only see Loader img) where is my problem can you help me?
JS Code
- <script type="text/javascript" >
var test = function(i) {
$("#preview").html('');
$("#preview").html('<img src="loader.gif" alt="Loading...."/>');
$("#titleform"+i).ajaxForm({
target: '#preview'
}).submit();
return false;
}
</script>
PHP Code
- <?php
- echo '
- <div id="preview">
- <form accept-charset="iso-8859-2" id="titleform'.++$i.'" method="post" action="action.php">
<input type="text" name="title" />
<p align="right"><input type="button" onclick="test('.$i.')" name="save_title" value="Save" /></p>
</form></preview>"';
- ?>