Problem with jQuery Form Plugin

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
  1. <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
  1. <?php
  2. echo '
  3. <div id="preview">
  4. <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>"';


  5. ?>








    • Topic Participants

    • test