Solved

The best way to fill db rows in certain way that i can get each details to be displayed on it related div using XMLHttpRequest

Posted on 2015-01-22
3
17 Views
Last Modified: 2016-05-20
Hello
I do need to make a database fetch using jquery  XMLHttpRequest
so i need to get related rows in the db query to be arranged in a way where i can get them displayed on the XMLHttpRequest response each details on their related div

What i exactly need the jquery function + php file ( i can take care of the db query stuff )


Thank you.
0
Comment
Question by:jaylab2
3 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40563987
This article should help you get started:
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/A_10712-The-Hello-World-Exercise-with-jQuery-and-PHP.html

PHP can turn almost any kind of data, including rows from a data base into a JSON representation.
http://php.net/manual/en/function.json-encode.php

You will probably want to learn about using JSON with jQuery (and if you truly understand jQuery, you will probably want to move to AngularJS instead).
http://api.jquery.com/jquery.getjson/
http://api.jquery.com/jquery.parsejson/
http://www.sitepoint.com/ajaxjquery-getjson-simple/
0
 

Author Comment

by:jaylab2
ID: 40564127
Hello
Thank you Ray for your reply but i get into these but it get a little bit confused can you please
give a small and simple example here that could make my life easier
Thank you in advance.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question