From: Stéphane Jacob Date: Sat, 13 Dec 2008 18:11:55 +0000 (+0100) Subject: Gets rid of attachEvent. X-Git-Tag: xorg/0.10.1~49^2~52 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8bcadd32fd1db00b2a8845eee03fbc20c488fae8;p=platal.git Gets rid of attachEvent. --- diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index 54aee90..6e71e95 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -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 = ''; }