1,105,534 Community Members

use AJAX to replace div in the current page from other page

Member Avatar
alihuta2002
Newbie Poster
1 post since Aug 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I know this may be a question that we see often, but I couldn't see any similar to my case or maybe just I don't understand the right concept of AJAX.

I'm kinda new to AJAX and trying to accomplish with one of my new project.

I've been told that using AJAX is better than using php to replace div content on the page.

I use to use php elseif echo to replace content but in this project I'm asking to use AJAX instead.

so what I'm having now is that a set of icons in the `index.php` page

for an example `[icon1][icon2][icon3][icon4][icon5][icon6]`

when the client click on any of the icon in this page there will be three div contents to be load which I've set them as `div id="player"` `div id="image"` `div id="title"`

and I understand that I can call the content from other file which I named them `contentone.html` and so on

in the `contentone.html` will contain three `div id` as well which I want when the client click on the icon then AJAX will load the content from this file and show them in the `index.php` page.

I know this shouldn't be ask but if anyone of you could guide me where to read or anything can help me to achieve this project will be so much appreciated

Member Avatar
rv1990
Junior Poster in Training
53 posts since Aug 2011
Reputation Points: 6 [?]
Q&As Helped to Solve: 7 [?]
Skill Endorsements: 2 [?]
 
0
 

I feel you are thinking on right path and carry forward your project. I am there for any kind of help.
For the above problem you must make a php file. When mouse click on any of those icon the data goes asynchronously to the php where it will find out the solution for the request and will display on the page.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: