By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

images(name|index).focus in Firefox

P: n/a
Is there a way to give an image focus in Firefox? This works in IE and
Opera:

if (document.images('foo').focus) {
document.images('foo').focus();
}

Thanks
Timo
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Timo wrote:
Is there a way to give an image focus in Firefox?
An image can't receive input so why do you want to give it focus?
This works in IE and
Opera:

if (document.images('foo').focus) {
document.images('foo').focus();
}


Make that ['foo'] in those two lines instead of ('foo') if you want to
prevent errors in many browsers.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
Trying to make sure than none of the textboxes has focus. Why? You really
don't want to know. :-)
Timo
Thanks for the syntax tip about [ ] vs ( ).

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread2.arcor-online.net...

An image can't receive input so why do you want to give it focus?

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.