From 8bcadd32fd1db00b2a8845eee03fbc20c488fae8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 13 Dec 2008 19:11:55 +0100 Subject: [PATCH] Gets rid of attachEvent. --- htdocs/javascript/profile.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 = ''; } -- 2.1.4