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
20 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 110

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

733 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