Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

PHP & AJAX

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

wussadotcom

My MemoriesVIP Member
Impact
58
Can someone explain me more about AJAX? Thanks
And also its relation to PHP.
Never used or known ajax.lol..I live in a deep dark world :lol:
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Ajax stands for Asynchronous JavaScript and XML.
It allows you to get or send information to other pages on your server using Javascript. Usually, those pages are php, which parse the information and reply back to your browser. Basically, it's communication between the web page and your server without reloading the entire page.

Let's say you have a site that you have to register for.
Instead of them submitting the form and waiting for all the style, images, and text to reload, just to be told that the username they attempted to use was taken is annoying (Also, they'll probably have to re-fillout part of the registration form).

With Ajax, you can have javascript grab the contents of a page like "checkname.php?name=[whatever they enetered]". The php page would only need to say "1" or "0" depending on whether it's taken or not.

The Javascript would see that and could alert the user almost immediately after they finished typing the name.

It's very useful, but shouldn't be relied on (haha, I've made that mistake before) because if their connection is slow, the response can be delayed. It also relies heavily on JavaScript, which is a problem if they don't have a lot of Ram (Or don't have JS enabled).

Note that if the script is on www.website.com/hello.js, you can only grab files from www.website.com/*

Valid requests would be for:
www.website.com/test.php
www.website.com/directory/file.php

Invalid requests include:
subdomain.website.com/file.php (A different subdomain)
http://website.com/file.php (Again subdomain, but this time the sub-dir. is blank)
www.google.com (Any other site)


Bruce
 
1
Close
1
Close
I see.Thanks a lot guys. Any suggestion on my site here
Check Page Rank :yell:
Seems a bit slow to load the results and I want it to be faster. Still dev the design so a bit out of alignment.
Thanks a lot
Anyway rep+ for both
 
0
Close
AJAX is good for better user interface. But it should only be used if there is a need for it.

Just using it for nice and cool effects is headache. :'(

You can also read more about improving user interface on Yahoo GUI library page.
 
0
Close
Try to visit developertutorials.com and learn more about AJAX and PHP you will find great and helpful tutroials and helping resources.
 
0
Close
ajaxdaddy.com is good if you want some apps built with ajax, and you can see how its done. Its how I learnt it :) (that and w3schools xD)
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back