Passing arguments to xmlhttprequest

  1. Add properties to xhr object, although this is not the preferred approach.

2. Wrap in a function as in:

Xhttp.onreadystatechange = function(){callback(x,g);};

Leave a Reply