Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
19 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
This article discusses four methods for overlaying images in a container on a web page
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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