Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function httpGetRequest(url)
- {
- var ipsRtr = "";
- var ipsReq = new XMLHttpRequest();
- var e = 0;
- try
- {
- var ipsReq = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (e)
- {}
- ipsReq.onreadystatechange = function ()
- {
- alert(ipsReq.status);
- if ((ipsReq.readyState == 4) && (ipsReq.status == 200))
- {
- ipsRtr = ipsReq.responseText;
- }
- }
- ipsReq.open("GET", url, false);
- ipsReq.send(null);
- if (ipsRtr == "")
- {
- $.get(
- url, function (data)
- {
- ipsRtr = data;
- });
- }
- if (ipsRtr == "")
- {
- return alert("[ERRO] Desconhecido");
- }
- return ipsRtr;
- }
- // Por Bruno da Silva
- // Nota: Precisa a biblioteca jQuery
- // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement