My understanding was that the plugin looked inside the form tag for the
action: <form id="noteform" action="taskaction.php" method="post">
and when you click submit, instead of doing an old fashioned submit, the
ajaxForm plugin kicks in, reads action="" from the form tag, and does it via
AJAX.

I have a similar form on another page that works perfectly:

<form id="newsform" action="addnews.php" method="post">
        <label>Title:</label><input type="text" name="title" style="width:
400px;"/>
        <label>Article:</label><textarea name="article" style="width: 400px;
height: 200px;"></textarea>
        <input type="submit" value="Submit" id="submit2"/><br/><br/>
</form>

$("#newsform").ajaxForm("#news"); being used to initialize it. You click on
submit, it uploads the contents of the form to addnews.php, and dumps the
output into the news div.

The only thing that differs between the two as far as I can tell is the form
in my problematic example is being called from AJAX load. (the ajaxForm is
being run in the callback for the page being loaded.)

If anyone would like to look at the actual page on the server, let me know
and I can send over a link. If I get some time tomorrow, I'd like to see if
I can replicate it on a page from scratch.


Klaus Hartl wrote:
> 
> Does your form contain an input field with the id "action"?
> 
> In your example I haven't spotted the place where you access the action 
> attribute...?
> 

-- 
View this message in context: 
http://www.nabble.com/Error-Handling-with-AJAX-tf2287092.html#a6358565
Sent from the JQuery forum at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to