How to refresh jQuery mobile page?

How to get mysql result with jquery without refreshing?

  • I want to get the mysql results without refreshing the page. Even if i manually insert values to mysql table, it should be on the page without any refresh or form submission. I know this should be done with jquery. Please give me the code to do this successfully. Thanks...

  • Answer:

    it's rely simple. All you need to do is ajax method with following attributes : client side: jquery code with ajax method 1.) url to which the php code will iterate your mysql database 2.) data to be sended. will be inside data attribute in json form. 3.) write methods after you receive a response i.e. json too. server side with php/mysql 1.) get data with $_GET method . in your case person id 2.) look into db. 3.) encode using echo json_encode(->data<-);

Jacky DJ at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You can do it without jQuery as well: Download the four free scripts "basic php site 1 to 4" from http://web2coders.com, and some other examples on how to use AJAX. JQuery is fine, but it is a big library, and the $ sign you have to use on every call often leads to problems when mixed with other languages...

just "JR"

you can use $('body').on('submit', '#yourId', function () { }); if jquery version is new or else use .submit() http://api.jquery.com/submit/ then use $.post() method. http://api.jquery.com/jQuery.post/

Viran

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.