From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 13 Nov 2008 09:49:11 +0000 Subject: New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojo/io/iframe.js | 358 ++++++++++++++++++++++++++++++++++++++++++ includes/js/dojo/io/script.js | 211 +++++++++++++++++++++++++ 2 files changed, 569 insertions(+) create mode 100644 includes/js/dojo/io/iframe.js create mode 100644 includes/js/dojo/io/script.js (limited to 'includes/js/dojo/io') diff --git a/includes/js/dojo/io/iframe.js b/includes/js/dojo/io/iframe.js new file mode 100644 index 0000000..a3003ba --- /dev/null +++ b/includes/js/dojo/io/iframe.js @@ -0,0 +1,358 @@ +if(!dojo._hasResource["dojo.io.iframe"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dojo.io.iframe"] = true; +dojo.provide("dojo.io.iframe"); + +dojo.io.iframe = { + create: function(/*String*/fname, /*String*/onloadstr, /*String?*/uri){ + // summary: + // Creates a hidden iframe in the page. Used mostly for IO + // transports. You do not need to call this to start a + // dojo.io.iframe request. Just call send(). + // fname: String + // The name of the iframe. Used for the name attribute on the + // iframe. + // onloadstr: String + // A string of JavaScript that will be executed when the content + // in the iframe loads. + // uri: String + // The value of the src attribute on the iframe element. If a + // value is not given, then dojo/resources/blank.html will be + // used. + if(window[fname]){ return window[fname]; } + if(window.frames[fname]){ return window.frames[fname]; } + var cframe = null; + var turi = uri; + if(!turi){ + if(dojo.config["useXDomain"] && !dojo.config["dojoBlankHtmlUrl"]){ + console.debug("dojo.io.iframe.create: When using cross-domain Dojo builds," + + " please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl" + + " to the path on your domain to blank.html"); + } + turi = (dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo", "resources/blank.html")); + } + var ifrstr = dojo.isIE ? '