473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

"Line 15 object required" when using ajaxlib.js

11
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 :
/////////////////////////////////////////////////
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.   <head>
  3.     <title>Testing AJAXLib</title>
  4.  
  5.     <script type = "text/javascript" src = "D:\AJAX\LIBRA\complete\step8\ajaxlib.js"></script>
  6.     <script language = "javascript">
  7.  
Expand|Select|Wrap|Line Numbers
  1.       function decodeXml()
  2.       {
  3.         var options = resultXML.getElementsByTagName("options");
  4.  
  5.         var loopIndex;
  6.         var div = document.getElementById('targetDiv');
  7. div.innerHTML = "The first color is " +
  8.           options[0].firstChild.data;
  9.  
  10.       }
Expand|Select|Wrap|Line Numbers
  1.     </script>
  2.   </head>
  3.  
  4.   <body>
  5.  
  6.     <H1>Testing AJAXLib</H1>
  7.  
  8.     <form>
  9.       <input type = "button" value = "Display Message"
  10.         onclick = "loadXMLDoc('options1.php', decodeXml, false)">
  11.     </form>
  12.  
  13.     <div id="targetDiv">
  14.       <p>The fetched data will go here.</p>
  15.     </div>
  16.  
  17.   </body>
  18. </html>
  19.  
//////////////////////////////////////////

and options1.php code is here

//////////////////////////////////////////////////
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <head>
  4.   <title></title>
  5. </head>
  6.  
  7. <body>
  8.  
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. header("content-type:text/xml");
  3. $options = array ('red','green','blue');
  4. echo '<?xml version = "1.0"?>';
  5. echo '<options>';
  6. foreach ($options as $value)
  7. {
  8. echo '<options>';
  9. echo $value;
  10. echo '<options>';
  11. }
  12. echo '<options>';
  13.  
Expand|Select|Wrap|Line Numbers
  1. ?>
  2.  
  3. </body>
  4.  
  5. </html>

i also have problem using otherr ajax framework's pleasee help
Sep 30 '07 #1
2 2138
pbmods
5,821 Expert 4TB
Heya, kujtim. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Please use CODE tags when posting source code:

[CODE=javascript]
JavaScript code goes here.
[/CODE]
Sep 30 '07 #2
acoder
16,027 Expert Mod 8TB
Instead of using an absolute path to a local file, use a relative path to the ajaxlib.js source file.
Sep 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dave Hammond | last post by:
I've got what should be a simple assignment of either an element value or a default string to a variable, but when the element doesn't exist I get an "Object required" error rather than an...
11
by: Florian Loitsch | last post by:
I'm currently writing a JS->Scheme compiler (which, using Bigloo, automatically yields a JS->C, JS->JVM, JS->.NET compiler), and have a question concerning the function-parameters: According to...
11
by: RWC | last post by:
Hello, I'm having trouble converting code in Access XP / 2002. I have some code that declares an variable "as database" in Access 97, which is not recognized in Access XP. I've tried to find a...
3
by: Steve Lutz | last post by:
Hi All, I have a Windows Service that runs well. The service hosts a remote object. The purpose of the object is so that I can "peak" into the service to see what it's doing. I wrote a small...
3
by: Karel Vandenhove | last post by:
Hi, I get an error "cannot apply indexing with to an expression of type object" when I try to compile the code below. SSLScannerManager is a COM component. (Used to access fingerprint...
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
5
by: Christian Hvid | last post by:
What is the easiest way to get the "row object" or "item object" when a datagrid is clicked? I have web form with a datagrid. And I have an array of something called BlogEntry that I bind to the...
9
by: Cao Yi | last post by:
Hi, here's a fract of codes, and what's the line "scanf("%lf%*", &cvi)" doing? ============================= do { printf("\nCoefficient: "); scanf("%lf%*", &cvi); getchar(); } while (cvi <=...
12
by: Dom | last post by:
VB had a "line" control, just a simple line that let you separate controls without the wasted space of a Groupbox. Did CSharp drop this? Dom
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.