Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Updating Only One Thing In A Page?
Feelay
post May 23 2008, 07:08 PM
Post #1


Kinda N00B
Group Icon

Group: Members
Posts: 230
Joined: 13-January 08
From: Sweden
Member No.: 27,579



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
Go to the top of the page
 
+Quote Post
vujsa
post May 24 2008, 12:00 AM
Post #2


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



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
Go to the top of the page
 
+Quote Post
TavoxPeru
post May 24 2008, 04:21 AM
Post #3


Super Member
Group Icon

Group: [HOSTED]
Posts: 763
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579



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,
Go to the top of the page
 
+Quote Post
Feelay
post May 24 2008, 04:48 PM
Post #4


Kinda N00B
Group Icon

Group: Members
Posts: 230
Joined: 13-January 08
From: Sweden
Member No.: 27,579



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

This post has been edited by Feelay: May 24 2008, 04:48 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Visual Web Developer 2005 Express Edition Beta 2(13)
  2. How To Increase Windows Shutdown Speed(39)
  3. A Solution For Disabled Right Click On Web Page(20)
  4. Weirdest Thing In Internet(38)
  5. Is The Processor Everything / Good For Gaming ?(14)
  6. Disable /change The Find In Page Sound In Firefox(1)
  7. PHP Tutorial: Form Verification And Simple Validation(12)
  8. How To Increase Your Google Page Rating ?(14)
  9. Choosing A Different Joomla Start Page(5)
  10. I'm A Little Lost: MapleStory Or RuneScape ?(41)
  11. GENX GDV 720: Ever Seen Anything Like This?(7)
  12. Supercooling(11)
  13. Problem With Purchase Credits Page(7)
  14. Afraid Of Updating My Wordpress(2)
  15. Server Status Page Gone(1)
  1. What Is The Coolest Thing You Can Do In Linux You Cant In Windows Or Mac?(8)
  2. Was My Site Data Copied By Someone?(6)
  3. Unintrusively Streaming Pdf Documents Into A Web Page(2)
  4. How To Create/edit/delete Ftp Accounts With Php(1)
  5. Javascript Tutorial For Beginner(0)
  6. How To Create A "user Profile" Page.(14)
  7. Similar Page Checker(0)
  8. 3d Game Creating Thing(1)
  9. Make It Impossible To View Page Source(11)
  10. Updating Graphics Card Problems(11)
  11. Hidden A Page Url(1)
  12. Hacked By Dumansal(2)
  13. Center Update(5)


 



- Lo-Fi Version Time is now: 11th October 2008 - 06:11 PM