View Single Post
Old 03-12-2007, 07:50 PM   PM User | #7
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
If I understand your goal correctly, you just need to call the function like this.

Code:
  if(xmlhttp.status==200)
  {
    var str=xmlhttp.responseText;
    var xml=xmlhttp.responseXML;
    func(xml);
  }
And the call is slightly modified from jkd's so the anonymous function takes a parameter.

Code:
window.onload=function(){
  var x=4;
  getReqObjPost("test.asp","",function(xml){doIt(xml,x)});
}
david_kw
david_kw is offline   Reply With Quote