Gets rid of attachEvent.
authorStéphane Jacob <jacou@melix.net>
Sat, 13 Dec 2008 18:11:55 +0000 (19:11 +0100)
committerStéphane Jacob <jacou@melix.net>
Sat, 13 Dec 2008 18:11:55 +0000 (19:11 +0100)
htdocs/javascript/profile.js

index 54aee90..6e71e95 100644 (file)
@@ -189,8 +189,7 @@ function validGeoloc(id, pref)
     document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
     document.forms.prof_annu[pref + "[text]"].value = document.forms.prof_annu[pref + "[geoloc]"].value;
     document.forms.prof_annu[pref + "[cityid]"].value = document.forms.prof_annu[pref + "[geoloc_cityid]"].value;
-    attachEvent(document.forms.prof_annu[pref + "[text]"], "click",
-                function() { document.forms.prof_annu[pref + "[text]"].blur(); });
+    $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
     document.forms.prof_annu[pref + "[text]"].className = '';
 }
 
@@ -200,8 +199,7 @@ function validAddress(id, pref)
     document.getElementById(id + '_geoloc_error').style.display = 'none';
     document.getElementById(id + '_geoloc_valid').style.display = 'none';
     document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
-    attachEvent(document.forms.prof_annu[pref + "[text]"], "click",
-                function() { document.forms.prof_annu[pref + "[text]"].blur(); });
+    $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
     document.forms.prof_annu[pref + "[text]"].className = '';
 }