All - I'm trying to write an RESTful AJAX application, using HTTP digest authentication on the REST resources. Up until now, it's been working fine. However, today I added some code, and Firefox now asks for a username and password using its standard login box, for most AJAX requests.
The code I added was in one of the existing AJAX handlers, to make a further AJAX request, based on the returned data. The code looks something like this: basic_ajax_get(url1, callback1); function callback1(req) { data = parse_result(req.responseText); url2 = some_function_of(data); bas0c_ajax_get(url2, callback2); // Works fine without this } function callback2(req) { // Do other stuff here } function basic_ajax_get(url, callback) { var req = get_ajax_object(); // Just gets a new XMLHTTPRequest object var account = document.getElementById("account").value var password = document.getElementById("password").value req.onreadystatechange = function() { callback(req); }; req.open("GET", api + url, true, account, password); req.send(""); } Has anyone else come across this issue? If so, do you have any idea how might I go about fixing it? Hugo. -- === Hugo Mills: h...@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Computer Science is not about computers, any more than --- astronomy is about telescopes.
signature.asc
Description: Digital signature
-- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --------------------------------------------------------------