diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojo/resources/iframe_history.html | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2 |
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
Diffstat (limited to 'includes/js/dojo/resources/iframe_history.html')
-rw-r--r-- | includes/js/dojo/resources/iframe_history.html | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/includes/js/dojo/resources/iframe_history.html b/includes/js/dojo/resources/iframe_history.html new file mode 100644 index 0000000..aee368f --- /dev/null +++ b/includes/js/dojo/resources/iframe_history.html @@ -0,0 +1,79 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> + <script type="text/javascript"> + // <!-- + var noInit = false; + + function defineParams(sparams){ + if(sparams){ + var ss = (sparams.indexOf("&") >= 0) ? "&" : "&"; + sparams = sparams.split(ss); + for(var x=0; x<sparams.length; x++){ + var tp = sparams[x].split("="); + if(typeof window[tp[0]] != "undefined"){ + window[tp[0]] = ((tp[1]=="true")||(tp[1]=="false")) ? eval(tp[1]) : tp[1]; + } + } + } + } + + function init(){ + // parse the query string if there is one to try to get params that + // we can act on. Also allow params to be in a fragment identifier. + var query = null; + var frag = null; + var url = document.location.href; + var hashIndex = url.indexOf("#"); + + //Extract fragment identifier + if(hashIndex != -1){ + frag = url.substring(hashIndex + 1, url.length); + url = url.substring(0, hashIndex); + } + + //Extract querystring + var parts = url.split("?"); + if(parts.length == 2){ + query = parts[1]; + } + + defineParams(query); + defineParams(frag); + + if(noInit){ return; } + var hasParentDojo = false; + try{ + hasParentDojo = window.parent != window && window.parent["dojo"]; + }catch(e){ + alert("Initializing iframe_history.html failed. If you are using a cross-domain Dojo build," + + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" + + " to the path on your domain to iframe_history.html"); + throw e; + } + + if(hasParentDojo){ + //Set the page title so IE history shows up with a somewhat correct name. + document.title = window.parent.document.title; + + //Notify parent that we are loaded. + var pdj = window.parent.dojo; + if(pdj["back"]){ + pdj.back._iframeLoaded(null, window.location); + } + } + + } + // --> + </script> +</head> +<body onload="try{ init(); }catch(e){ alert(e); }"> + <h4>The Dojo Toolkit -- iframe_history.html</h4> + + <p>This file is used in Dojo's back/fwd button management.</p> +</body> +</html> |