tags:

views:

23

answers:

0

Hello,I have several forms,one for adding news,one for deleting news,one for something else,...,when add or update news,options that i use in ajaxForm stay in my memory,and when I first add news,than later update,when click update button,news are update and add,can someone help me a little. Maybe problem is that I have 2 different submit button,one for add news and one for update news in one form I use this code :

 $jq("#AddNewsBtn").click(function(){
        $jq("#NewsForm").ajaxForm(ajax_form_add_news);
    });
 $jq("#UpdateBtn").click(function(){
        $jq("#NewsForm").ajaxForm(ajax_form_update_news);
    });