From 7a4a84d7ef6c90ecb948fb3393d05958953db8a0 Mon Sep 17 00:00:00 2001 From: "scotty.b.brown" Date: Wed, 24 Nov 2010 10:03:24 +0000 Subject: [PATCH] Stubbing our #150 git-svn-id: https://beef.googlecode.com/svn/trunk@574 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- modules/beefjs/dom.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/beefjs/dom.js b/modules/beefjs/dom.js index 331ac643b..06bcd7de9 100644 --- a/modules/beefjs/dom.js +++ b/modules/beefjs/dom.js @@ -62,6 +62,31 @@ beef.dom = { return iframe; }, + /** + * @params: {String} url: target url which is loaded in the iframe. + * @params: {String} method: whether to use a GET or POST HTTP method. + * @params: {Hash} params: list of params that will be sent in request. + * @params: {Boolean} hidden: whether to make the iframe hidden. + * @params: {Boolean} remove: whether to remove the iframe from the dom once it is loaded. + * @return: {String} result: success, failure or timeout + */ + + iframeCreate: function(url, method, params, hidden, remove){ + var iframe = this.createElement('iframe', { + width: '1px', + height: '1px', + style: 'visibility:hidden;', + location: url + }); + + document.body.appendChild(iframe); + + var result = "success"; + + return result; + }, + + /** * Get the location of the current page. * @return: the location.