1

I wish to show newly added data to a listing page, which listed on the same page. My problem is that after adding data to my database I needed to reload entire page to see the new data. How can I view without reloading entire page?

listing page

3
  • 8
    to load data without reloading page, use ajax Commented Dec 21, 2012 at 8:11
  • Look at jQuery.ajax() Commented Dec 21, 2012 at 8:17
  • your ajax code required. Plz post that too. Commented Dec 21, 2012 at 8:27

2 Answers 2

1

If you only want to refresh the table, you can use this jQuery plugin: http://datatables.net

You can call table refresh functions whenever you want. The plugin works using AJAX. To work with you need to have little javascript knowledge as well.

You can find sort of example/demo from here. http://editor.datatables.net/tutorials/api_manipulation

However if you really want to do this get the concept and you also can develop same thing. You just require to learn some AJAX.

Sign up to request clarification or add additional context in comments.

Comments

0

in Button click after data saved to database you need to use following script. no need to go round trips to server to client instead manipulate client side.

$("#btnSubmit").click(function () { $('#myForm').ajaxForm({ success: function(){ $('#myTable tr:first').after('<tr><td>' + $("#Name").val() + '</td></tr>'); } }); }); 

2 Comments

This is true, but dangerous at the same time; the server call could have failed, but the user doesn't notice.
i am not given full Answer here. using ajax submit in JQuery you can able to find the form submit success or failure? when the for submitted successfully you want to call this code.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.