This update fixes issue 241.

The support function beef.net.get_ajax() re-added. The requester relies on this function. 



git-svn-id: https://beef.googlecode.com/svn/trunk@683 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
wade@bindshell.net
2011-01-09 19:55:50 +00:00
parent 904cb43c51
commit 19561b5002

View File

@@ -10,6 +10,25 @@ beef.net = {
beef_queue: [],
/**
* Gets an object that can be used for ajax requests.
*
* @example: var http = beef.net.get_ajax();
*/
get_ajax: function() {
// try objects
try {return new XMLHttpRequest()} catch(e) {};
try {return new ActiveXObject('Msxml2.XMLHTTP')} catch(e) {};
try {return new ActiveXObject('Microsoft.XMLHTTP')} catch(e) {};
// unsupported browser
console.error('You browser is not supported')
console.error('please provide details to dev team')
return false;
},
/**
* Build param string from hash.
*/
@@ -49,7 +68,7 @@ beef.net = {
*
* @example: beef.net.raw_request("http://beef.com/", 'POST', handlerfunction, "param1=value1&param2=value2");
*/
raw_request: function(url, method, handler, params) {
raw_request: function(url, method, handler, params) {
$j.getScript( url + '?' + params);
},