redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

CurrentElement function is not working in firefox


Goto page 1, 2  Next
 
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum
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
  Reply with quote


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?
  Reply with quote
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()
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
.select() would probably be more noticable...
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
CurrentElement.focus() is also not working properly in firefox
  Reply with quote
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.
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
I am passing onchange="validate(this)"
And there i am using this.focus()
  Reply with quote
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(); ... }
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
i have the function defined as function validate(currentElement)
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Er function bar($foo), and bar(this) from onchange
  Reply with quote
Page 1 of 2 Goto page 1, 2  Next
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group