diff --git a/core/main/client/dom.js b/core/main/client/dom.js index 9774a7423..4f0519438 100644 --- a/core/main/client/dom.js +++ b/core/main/client/dom.js @@ -102,26 +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, 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') { @@ -133,15 +126,6 @@ beef.dom = { } var iframe = $j('