web hosting and development forums
Web Design and Development Forums Archive


Index - JavaScript forum

CurrentElement function is not working in firefox


Post reply

CurrentElement.nextSibling.nextSibling.focus() function is working fine in IE but not in firefox CurrentElement.focus() is also not workin properly in firefox Any help please
Function nextElement($start){ var $el=$start.nextSibling; while($el && $el.nodeType!=1){ $el=$el.nextSibling; } return $el==$start?null:$el; } What kind of element is currentElement?
I tried getting the id of the element and focussing Its a textbox Its like using this.focus()
.select() would probably be more noticable...
CurrentElement.focus() is also not working properly in firefox
Alert that el's id, value attributes to make sure you have the right one. It doesn't sound like it is.
I am passing onchange="validate(this)" And there i am using this.focus()
Um, you can't name a variable 'this', that's a special identifier and reserved word. Function($foo){ ... $foo.focus(); ... }
i have the function defined as function validate(currentElement)
Er function bar($foo), and bar(this) from onchange
And there i am using currentElement.focus()
Ok
But its working fine in IE but not in firefox
Yes, that usually indicates something's wrong.




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com