This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

How to define focus() method in JS

 
Radhakrishna Sharma Gorenta
Ranch Hand
Posts: 63
Google App Engine Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator


I am getting an error "the focus() method undefined"
How to remove this error? please help me
thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
There's no input tag for first or last name in that HTML page. This makes document.frm.firstname null so you can't call a method on it.
 
Radhakrishna Sharma Gorenta
Ranch Hand
Posts: 63
Google App Engine Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
There is no problem with the execution of the code. The only problem is my IDE is showing it as a error(undefined function focus()) underlined with red color. As a result each time i used focus() method it is appearing as an error. i just want to remove the warning/error by my IDE(Eclipse).
 
Radhakrishna Sharma Gorenta
Ranch Hand
Posts: 63
Google App Engine Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Looks like your ide is wrong, what a surprise. lol

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Complaining about IDEs here is not useful. Log a bug report with the IDE.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic