summaryrefslogtreecommitdiff
path: root/demos/address-book/protected/pages/flex/html-template/history.js
diff options
context:
space:
mode:
authorwei <>2007-01-17 11:55:40 +0000
committerwei <>2007-01-17 11:55:40 +0000
commit912dc30b43330a3e99a3e1f947ff14de108a3701 (patch)
tree064a66120c95b043de9f9d56fb52d3e66bfe3e81 /demos/address-book/protected/pages/flex/html-template/history.js
parent3dc598bc7c2604e24b9e0be1189d9d78b43737ea (diff)
Add address-book flex demo
Diffstat (limited to 'demos/address-book/protected/pages/flex/html-template/history.js')
-rw-r--r--demos/address-book/protected/pages/flex/html-template/history.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/demos/address-book/protected/pages/flex/html-template/history.js b/demos/address-book/protected/pages/flex/html-template/history.js
new file mode 100644
index 00000000..b0537ef1
--- /dev/null
+++ b/demos/address-book/protected/pages/flex/html-template/history.js
@@ -0,0 +1,48 @@
+// $Revision: 1.49 $
+// Vars
+Vars = function(qStr) {
+ this.numVars = 0;
+ if(qStr != null) {
+ var nameValue, name;
+ var pairs = qStr.split('&');
+ var pairLen = pairs.length;
+ for(var i = 0; i < pairLen; i++) {
+ var pair = pairs[i];
+ if( (pair.indexOf('=')!= -1) && (pair.length > 3) ) {
+ var nameValue = pair.split('=');
+ var name = nameValue[0];
+ var value = nameValue[1];
+ if(this[name] == null && name.length > 0 && value.length > 0) {
+ this[name] = value;
+ this.numVars++;
+ }
+ }
+ }
+ }
+}
+Vars.prototype.toString = function(pre) {
+ var result = '';
+ if(pre == null) { pre = ''; }
+ for(var i in this) {
+ if(this[i] != null && typeof(this[i]) != 'object' && typeof(this[i]) != 'function' && i != 'numVars') {
+ result += pre + i + '=' + this[i] + '&';
+ }
+ }
+ if(result.length > 0) result = result.substr(0, result.length-1);
+ return result;
+}
+function getSearch(wRef) {
+ var searchStr = '';
+ if(wRef.location.search.length > 1) {
+ searchStr = new String(wRef.location.search);
+ searchStr = searchStr.substring(1, searchStr.length);
+ }
+ return searchStr;
+}
+var lc_id = Math.floor(Math.random() * 100000).toString(16);
+if (this != top)
+{
+ top.Vars = Vars;
+ top.getSearch = getSearch;
+ top.lc_id = lc_id;
+}