diff --git a/core/main/client/dom.js b/core/main/client/dom.js index 27b98a64e..4f0519438 100644 --- a/core/main/client/dom.js +++ b/core/main/client/dom.js @@ -102,23 +102,19 @@ beef.dom = { }, /** - * Create and iFrame element. In case it's create with POST method, the iFrame is automatically added to the DOM and submitted. - * example usage in the code: beef.dom.createIframe('fullscreen', 'get', {'src':$j(this).attr('href')}, {}, null); + * Create an iFrame element and prepend to document body. URI passed via 'src' property of function's 'params' parameter + * is assigned to created iframe tag's src attribute resulting in GET request to that URI. + * example usage in the code: beef.dom.createIframe('fullscreen', {'src':$j(this).attr('href')}, {}, null); * @param: {String} type: can be 'hidden' or 'fullScreen'. defaults to normal - * @param: {String} method: can be 'GET' or 'POST'. defaults to GET * @param: {Hash} params: list of params that will be sent in request. * @param: {Hash} styles: css styling attributes, these are merged with the defaults specified in the type parameter * @param: {Function} a callback function to fire once the iFrame has loaded * @return: {Object} the inserted iFrame + * */ - createIframe: function(type, method, params, styles, onload) { + createIframe: function(type, params, styles, onload) { var css = {}; - var form_submit = (method.toLowerCase() == 'post') ? true : false; - if (form_submit && params['src']) - { - var form_action = params['src']; - params['src'] = ''; - } + if (type == 'hidden') { css = $j.extend(true, {'border':'none', 'width':'1px', 'height':'1px', 'display':'none', 'visibility':'hidden'}, styles); } else if (type == 'fullscreen') { @@ -130,13 +126,6 @@ beef.dom = { } var iframe = $j('').attr(params).css(css).load(onload).prependTo('body'); - if (form_submit && form_action) - { - var id = beef.dom.generateID(); - $j(iframe).attr({'id': id, 'name':id}); - var form = beef.dom.createForm({'action':form_action, 'method':'get', 'target':id}, false); - $j(form).prependTo('body').submit(); - } return iframe; }, diff --git a/extensions/customhook/html/index.html b/extensions/customhook/html/index.html index 52150e454..a76f0ed9e 100644 --- a/extensions/customhook/html/index.html +++ b/extensions/customhook/html/index.html @@ -18,7 +18,7 @@