FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need help with PHP with Javascript





DudeAmI0
I dont know which to post, but this is more php so im asking here.

I have been coding for about... 6 months, but i never got the hang of the constent, always running php. Where you use javascript to update the page without reloading... How do I do this?
nikolic
There are a number or ways to go about this depending upon whether or not you already know what info needs to be displayed.

If you know what will be displayed already, like let's say during a questionaire a user gets a, "That's correct" or "try again" then just include the information with the page as it downloads.

If you don't know what will be updated, such as map directions or updated pricing in a stock ticker, then you will likely want to use AJAX, which is really just a buzzword for using javascript to have a browser open a connection and download select pieces of information without disturbing the rest of what is already present. You can also use other technologies to do this.

http://www.w3schools.com/ajax/default.asp

Hope that it helps.
quartz
thank you nikolic for link.
Its usefull at least for me Smile
yjwong
There is also a way where you fetch a temporary IFRAME to display the new content. Some people also use 0x0 pixel IFRAMEs to let the data on the temporary IFRAME (which is not viewable) to be accessed by the main page, so that data will change dynamically.
Related topics
[HELP] PHP -> Scripting
Needing a Bit Og Help {PHP}!
need some help - php switch code
I could really use some help with Javascript...
how did you learn about html, php or other languages???
Question about forms on websites?
HELP with Javascript!
Layout Gap PRoblems with PHP/Javascript Combo
Help with Javascript Aquarium
php / javascript script works in FireFox browser, but not IE
Help with javascript!!
A good place to learn html/php/javascript/etc....
[HELP] PHP (and some MyBB) Administration
Javascript timer - need help :(
some help with javascript please
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.