-/* 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. */
document.observe("dom:loaded", function() {
var form = $("contactform");
- form.focus();
+ form.setfocus();
form.observe('submit', function(evt) {
var control, errorElements;
* if there are errors, cancel submission
*/
if (errorElements.length) {
- errorElements[0].highlight('#F08080').focus();
- errorElements[0].select();
+ errorElements[0].highlight('#F08080').activate();
evt.stop();
}
});