Meaningless Drivel is fun!
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


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: 62



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


Regards,

Radhakrishna
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 62

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: 62

Eric Pascarello
author
Rancher

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

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to define focus() method in JS
 
It's not a secret anymore!