romans1423 wrote: Won't this affect the BBCode JavaScript, which reference the posting form by the name "post", not "form" (which this MOD changes it to)??
GPHemsley wrote:Carpe Diem wrote:I'm using a 2.0.4 board..
That could be the reason you are not haveing problems... This is a 2.0.5 MOD... (Weird, I know)
However, the JavaScript that you add to the overall_header results in an error on any page that doesn't have a modded form since the header JS references the forms which don't exist on every page...
AbelaJohnB wrote:romans1423 wrote:Won't this affect the BBCode JavaScript, which reference the posting form by the name "post", not "form" (which this MOD changes it to)??
If you find that happening, I'd be interrested in knowing about it.
Code: Select all
function focusTextField (form) {
// first, validate form objects
if ((typeof form != 'object') || (typeof form.elements != 'object')) {
return false;
}
// set array of elements
var elements = form.elements;
// loop through array of elements, finding the first empty input field
// set focus to that field
for (var i = 0; i < elements.length; i++) {
if ((elements[i].type != 'text') &&
(elements[i].type != 'password') &&
(elements[i].type != 'textarea'))
{
continue;
}
if (elements[i].name == 'helpbox') {
continue;
}
if (elements[i].value == '') {
elements[i].focus();
break;
}
}
return true;
}