X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Fcontact.js;h=eb8cf921b25d5c103066958487bda4f2db442243;hb=c06c7fd6e6f26d31abb8d7c9a9f9e3f2d5b27d5c;hp=e41734110f7ca7426ef60a72459c6ef2048c1147;hpb=4360d632b91c3e17a776bc9308eba3a3915f7005;p=syj.git diff --git a/public/js/contact.js b/public/js/contact.js index e417341..eb8cf92 100644 --- a/public/js/contact.js +++ b/public/js/contact.js @@ -1,9 +1,11 @@ -/* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier, +/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier, and is published under the AGPL license. */ +"use strict"; + document.observe("dom:loaded", function() { var form = $("contactform"); - form.focus(); + form.setfocus(); form.observe('submit', function(evt) { var control, errorElements; @@ -25,8 +27,7 @@ document.observe("dom:loaded", function() { * if there are errors, cancel submission */ if (errorElements.length) { - errorElements[0].highlight('#F08080').focus(); - errorElements[0].select(); + errorElements[0].highlight('#F08080').activate(); evt.stop(); } });