AJAX is used for interactive communication with an XML file. Website may provide information from an XML file using AJAX search technology, if you select an item in a list box.
Select a CD:
TITLE: One night only ARTIST: Bee Gees COUNTRY: UK COMPANY: Polydor PRICE: 10.90 YEAR: 1998
This is the JavaScript code stored in the file "selectcd.js":
[code]
var xmlhttp
function showCD(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="getcd.php";
AJAX can be used for interactive communication with an XML file. A web page can fetch information from an XML file with AJAX technology, e.g when you select an item from a dropdown box.
TITLE: One night only ARTIST: Bee Gees COUNTRY: UK COMPANY: Polydor PRICE: 10.90 YEAR: 1998
The PHP script loads an XML document, "cd_catalog.xml", runs a query against the XML file, and returns the result as HTML:
[code]
<?php
$q=$_GET["q"];
$xmlDoc = new DOMDocument();
$xmlDoc->load("cd_catalog.xml");
$x=$xmlDoc->getElementsByTagName('ARTIST');
| Title | Under | Posted on |
|---|---|---|
| Inserting records | PeopleSoft Technical | 07/28/2010 - 11:03am |
| WEBLIB_PT_NAV.ISCRIPT1.FieldFormula.IScript_PT_NAV_PAGELET error... | PeopleSoft Technical | 07/27/2010 - 2:02pm |
| Basic language | PeopleSoft Technical | 07/27/2010 - 7:12am |
| Rowlevel security from app designer | PeopleSoft Technical | 07/27/2010 - 5:15am |
Recent comments
54 min 23 sec ago
57 min 35 sec ago
13 hours 15 min ago
13 hours 18 min ago
22 hours 38 min ago
1 day 1 hour ago
1 day 1 hour ago
1 day 1 hour ago
1 day 9 hours ago
1 day 10 hours ago