formData: function (url, data1, data2) {
var tempForm = document.createElement("form");
tempForm.id = "tempForm1";
tempForm.method = "post";
tempForm.action = url;
tempForm.target = "_blank";
var hideInput1 = document.createElement("input");
hideInput1.type = "hidden";
hideInput1.name = "username";
hideInput1.value = data1;
var hideInput2 = document.createElement("input");
hideInput2.type = "hidden";
hideInput2.name = "password";
hideInput2.value = data2;
tempForm.appendChild(hideInput1);
tempForm.appendChild(hideInput2);
if (document.all) {
tempForm.attachEvent("onsubmit", function () { });
} else {
var subObj = tempForm.addEventListener("submit", function () { }, false);
}
document.body.appendChild(tempForm);
if (document.all) {
tempForm.fireEvent("onsubmit");
} else {
tempForm.dispatchEvent(new Event("submit"));
}
tempForm.submit();
document.body.removeChild(tempForm);
}