wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Cant able to get focus at perticular textfield in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Cant able to get focus at perticular textfield in javascript" Watch "Cant able to get focus at perticular textfield in javascript" New topic
Author

Cant able to get focus at perticular textfield in javascript

kavita vala
Ranch Hand

Joined: Jul 22, 2010
Posts: 42
I have a problem with javascript focus()

I have a html page in which i have



And a javascript file isgiven below
validate.js



So in above code i cant able to get focus in text field.
What can i do please help me.

vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

your code is working in IE 7 when i tested pasting it on blank html and embeded js function in the same page ...

whether are you refering your js file from html page like this


if not change..like this
or
then just try whether your validate function is getting called just tring this way

if that is working then your other code also should work ..otherwise it will be problem with your browser ...>


VIJINDAS
kavita vala
Ranch Hand

Joined: Jul 22, 2010
Posts: 42
I get alert and all functionality but cant able to only set focus to text field
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

kavita vala wrote:I get alert and all functionality but cant able to only set focus to text field

which browser you are using ??? any other controlls (field s ) are there in that page ???
Eswar Nec
Ranch Hand

Joined: May 02, 2010
Posts: 105
Hi,

Focus using, both form and field id.


Wake up! Don't let your smile be snatched away by anybody!
Regards, Eswar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cant able to get focus at perticular textfield in javascript