]> dev.renevier.net Git - syj.git/blobdiff - public/js/utils.js
fixes in ie: focus was not set correctly in forms
[syj.git] / public / js / utils.js
index f5817d491a2087f3198089e5dad1d0d77bc87a18..7126e335410139767a80e7f4890b58461a5270ca 100644 (file)
@@ -21,6 +21,10 @@ var CloseBtn = Class.create({
         btn = new Element("input", { type: "image", src: imgsrc, alt: "X"}).setStyle(style);
         elt.insert({top: btn});
         btn.observe("click", function(evt) {
+            evt.stop();
+            if (typeof options.callback === "function") {
+                options.callback.call(elt);
+            }
             elt.hide();
         });
     }
@@ -186,7 +190,7 @@ Element.addMethods('form', {
         });
     },
 
-    focus: function(form) {
+    setfocus: function(form) {
         var tofocus, error;
 
         tofocus = null;