• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 725
  • Last Modified:

Javascript - array of XmlHttpRequest objects

I've got an application that builds block of javascript code dynamically and then adds it to the page.  The code that is built dynamically is...

<script>var XHRList = new Array();XHRList[0] = CreateXmlHttpRequestObject();XHRList[1] = CreateXmlHttpRequestObject();XHRList[2] = CreateXmlHttpRequestObject();XHRList[3] = CreateXmlHttpRequestObject();XHRList[4] = CreateXmlHttpRequestObject();XHRList[5] = CreateXmlHttpRequestObject();XHRList[6] = CreateXmlHttpRequestObject();</script>

The javascript function CreateXmlHttpRequestObject() is already part of the page that the above code is being added to and I have verified that it does return an XmlHttpRequest object.  Yet, when the page starts to run the above block of code that is trying to create an array of XmlHttpRequest objects, I'm getting an error on the first saying "Object Expected".

Do I have to do something special to stick these objects inside of an array?
0
josephdaviskcrm
Asked:
josephdaviskcrm
  • 2
1 Solution
 
quincydudeCommented:
can u show us your CreateXmlHttpRequestObject() ?
0
 
BadotzCommented:
<$.02>And for heaven's sake, use a little whitespace.</$.02>
0
 
josephdaviskcrmAuthor Commented:
nevermind... I figured it out on my own.
0
 
BadotzCommented:
Show us what you did, please.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now