Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function callScripto() {
- try {
- //create the XMLHttpRequest object
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
- } catch (e) {}
- var xmlHttpReq = false;
- var self = this;
- if (window.XMLHttpRequest) {
- self.xmlHttpReq = new XMLHttpRequest();
- }
- else if (window.ActiveXObject) {
- self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- // pass in the login credentials from the form into the url
- var form = document.forms['f1'];
- var username = form.username.value;
- var password = form.password.value;
- var url = scriptoURL + scriptName1 + "?username=" + username + "&password=" + password;
- // post the parameters to Scripto via the url
- self.xmlHttpReq.open('POST', url, true);
- self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- self.xmlHttpReq.onreadystatechange = function() {
- // when the response is returned, call the getjson() function on the returned string
- if (self.xmlHttpReq.readyState == 4) {
- getjson(self.xmlHttpReq.responseText);
- }
- }
- self.xmlHttpReq.send();
- }
Add Comment
Please, Sign In to add comment