i have problem using ajaxlib.js i have includet as it should in the same directoryy the ajaxlib.js with my codee but i am reciving error "line 15 object required " .
here is my codeee ......
testest.html :
/////////////////////////////////////////////////[code=html]
<html>
<head>
<title>Testin g AJAXLib</title>
<script type = "text/javascript" src = "D:\AJAX\LIBRA\ complete\step8\ ajaxlib.js"></script>
<script language = "javascript ">
[/code][code=javascript]
function decodeXml()
{
var options = resultXML.getEl ementsByTagName ("options");
var loopIndex;
var div = document.getEle mentById('targe tDiv');
div.innerHTML = "The first color is " +
options[0].firstChild.dat a;
}[/code][code=html]
</script>
</head>
<body>
<H1>Testing AJAXLib</H1>
<form>
<input type = "button" value = "Display Message"
onclick = "loadXMLDoc('op tions1.php', decodeXml, false)">
</form>
<div id="targetDiv" >
<p>The fetched data will go here.</p>
</div>
</body>
</html>
[/code]
//////////////////////////////////////////
and options1.php code is here
//////////////////////////////////////////////////
[code=html]
<html>
<head>
<title></title>
</head>
<body>
[/code][code=php]
<?php
header("content-type:text/xml");
$options = array ('red','green', 'blue');
echo '<?xml version = "1.0"?>';
echo '<options>';
foreach ($options as $value)
{
echo '<options>';
echo $value;
echo '<options>';
}
echo '<options>';
[/code][code=html]
?>
</body>
</html>[/code]
i also have problem using otherr ajax framework's pleasee help
here is my codeee ......
testest.html :
/////////////////////////////////////////////////[code=html]
<html>
<head>
<title>Testin g AJAXLib</title>
<script type = "text/javascript" src = "D:\AJAX\LIBRA\ complete\step8\ ajaxlib.js"></script>
<script language = "javascript ">
[/code][code=javascript]
function decodeXml()
{
var options = resultXML.getEl ementsByTagName ("options");
var loopIndex;
var div = document.getEle mentById('targe tDiv');
div.innerHTML = "The first color is " +
options[0].firstChild.dat a;
}[/code][code=html]
</script>
</head>
<body>
<H1>Testing AJAXLib</H1>
<form>
<input type = "button" value = "Display Message"
onclick = "loadXMLDoc('op tions1.php', decodeXml, false)">
</form>
<div id="targetDiv" >
<p>The fetched data will go here.</p>
</div>
</body>
</html>
[/code]
//////////////////////////////////////////
and options1.php code is here
//////////////////////////////////////////////////
[code=html]
<html>
<head>
<title></title>
</head>
<body>
[/code][code=php]
<?php
header("content-type:text/xml");
$options = array ('red','green', 'blue');
echo '<?xml version = "1.0"?>';
echo '<options>';
foreach ($options as $value)
{
echo '<options>';
echo $value;
echo '<options>';
}
echo '<options>';
[/code][code=html]
?>
</body>
</html>[/code]
i also have problem using otherr ajax framework's pleasee help
Comment