summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/extended
diff options
context:
space:
mode:
authorwei <>2006-01-13 04:55:22 +0000
committerwei <>2006-01-13 04:55:22 +0000
commit8da0f8dd4a0347f15df6e71ac2b0f4b3c27e8475 (patch)
treef4b75568da1fd702bcb3320259bb1642f3cc53b8 /framework/Web/Javascripts/extended
parentd202492e4ad31c4127b4b459b300de7cd1976c1b (diff)
Focus added to client validators
Diffstat (limited to 'framework/Web/Javascripts/extended')
-rw-r--r--framework/Web/Javascripts/extended/dom.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/extended/dom.js b/framework/Web/Javascripts/extended/dom.js
index de5ae056..f29cf37d 100644
--- a/framework/Web/Javascripts/extended/dom.js
+++ b/framework/Web/Javascripts/extended/dom.js
@@ -69,6 +69,17 @@ Prado.Element =
for(var i = 0; i<options.length; i++)
el.options[el.options.length] = new Option(options[i][0],options[i][1]);
}
+ },
+/**
+ * A delayed focus on a particular element
+ * @param {element} element to apply focus()
+ */
+ focus : function(element)
+ {
+ var obj = $(element);
+ if(isObject(obj) && isdef(obj.focus))
+ setTimeout(function(){ obj.focus(); }, 100);
+ return false;
}
}