| View previous topic :: View next topic |
| Author |
Message |
Koplaf
Joined: 28 May 2006 Posts: 130
|
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 |
| |
|
|
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
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? |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
I tried getting the id of the element and focussing
Its a textbox
Its like using this.focus() |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| .select() would probably be more noticable... |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| CurrentElement.focus() is also not working properly in firefox |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| Alert that el's id, value attributes to make sure you have the right one. It doesn't sound like it is. |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
I am passing onchange="validate(this)"
And there i am using this.focus() |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
Um, you can't name a variable 'this', that's a special identifier and reserved word.
Function($foo){ ... $foo.focus(); ... } |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| i have the function defined as function validate(currentElement) |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| Er function bar($foo), and bar(this) from onchange |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|