v...">

Insert into database on every EditInPlace in JQuery

How to insert into database on every edit in JQuery ..

               <script type="text/javascript">
                   var increment = 0;
        $(document).ready(function(){
                       $(".menu a").click(function () {
                        increment++;
   $("<div> Label </div>").appendTo(".menu li").addClass("div" + increment);
                 $(".div" + increment).show(function () {
           $(".div" + increment).editInPlace({
                url: "./server",
                show_buttons: true
                    });//editinplace

                         });//show
               });//click
            });
    </script>

      

0


a source to share


3 answers


The best way to insert into a database with jQuery is to use jQuery to call a page that has other code that can be easily inserted into the database.



The most common way to do this is to use the PHP and JQuery post / get / ajax functions to call the page with the PHP code that is used to insert into the database.

0


a source


You cannot insert only JQuery into the database. You have to use AJAX to send data to the server and then insert it into the database there.



+2


a source


You can use asp.net page methods to handle ajax request from edit in place and handle pushing information to database in that method. I am doing this on my current project and it really is a charm for the user because they don't have to refresh the whole page for small changes!

0


a source







All Articles