aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to define focus() method in JS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic
Author

How to define focus() method in JS

rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 50



I am getting an error "the focus() method undefined"
How to remove this error? please help me
thanks in advance.


Regards,

RK
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29239
    
139

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 50

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).
rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 50

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Looks like your ide is wrong, what a surprise. lol

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Complaining about IDEs here is not useful. Log a bug report with the IDE.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to define focus() method in JS
 
Similar Threads
code not working properly
Cross browser issues
JS text in html page
JavaScript Validation in struts
javaScipt onsubmit problem in jsp