Updating Only One Thing In A Page?

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Updating Only One Thing In A Page?

Feelay
Hey!

I just wanted to know:
Is it possible to update only one thing on a page?

Lets say I have an "About Us" page.
Is it possible to have "links" or something, so that when I press on them (one of the links), text/information about the person I pressed on will appear on the page, but the whole page wont update?

Something like flash, but I want to use PHP/HTML instead (or whatever language I need, but I think it is PHP).

And OFC tongue.gif if possible, can anyone be kind enough to tell me how (a)

Thank You ^.^

//Feelay

Reply

vujsa
AJAX - Asynchronous JavaScript And XML

Specifically, AJAX with PHP!

JavaScript sends a request (asynchronously) to the PHP script. The PHP script uses the information and returns output usually in an XML format. The JavaScript reads the XML and updates the page.
Google "AJAX with PHP tutorials" for more information.

The PHP is rather easy, you do it like you were getting data from a for and then just format your output in XML.
The JavaScript is a little more complicated.

Just remember, the JS gets data from the page in the form of a link or form ans sends the data to the PHP script. The PHP does all of the work as far as database manipulation, data manipulation, and xml output. The JS then writes the data to the page in the manner in which you tell it to. This is the tricky part since different browsers handle different JavaScript differently. I love using the same word multiple time in a sentence!

Good luck,
vujsa

Reply

TavoxPeru
You can do that with a combination of PHP and AJAX as vujsa says, there are some different ways for it, right now i'm not in my home machine so i can't post any example sad.gif

The output generated by the PHP script not only would be in an XML format, also, it would be in a JSON format, that is an usually format used by javascript.

Best regards,

Reply

Feelay
bah.. everything have to be so hard tongue.gif
I don't know anything (not even how to start coding with it [like <?php ?> with php]) JS or XML xD
Well tongue.gif If there isn't any other way, I'll try to learn some new languages this summer.

Thanks guys smile.gif
//Feelay

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:


Searching Video's for updating, thing, page,
advertisement




Updating Only One Thing In A Page?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE