Authorization through setRequestHeader
authentication, javascript
Solution
You need a function to Base64 encode the User:Password string. See this question which gives a couple of good options to do this in javascript.
Problem
I found this code which makes it possible to authenticate using setRequestheader and Ajax. ``` this.xmlDoc.setRequestHeader('Authorization','Basic ' + Base64.encode("User:Password")); ``` Unfortunatily I have no knowledge of Ajax and Base64 does not seem to be class or method I can reference. Is there an alternative for this Basic encryption? Or a simular encode function I can call from Javascript? Thank you !