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

focus( ) problem

P: n/a
I have a page that has 3 different iframes in it. The bottom iFrame
continually gets updated as the user adds different images to it
through the interface, and once the user clicks one of the images, I
change the style of the image to put a border around it.
The problem is, once I set off this function to put a border around the
clicked image, the iFrame resets itself. So, if I've scrolled over to
the right a bit and clicked on a pic, the frame resets itself all the
way to the left, so the user would have to scroll back over to see the
pic they just clicked.
I've tried doing an onFocus in the function that adds the style, and
it's not working.

identity=document.getElementById(picid);
identity.focus();

Any ideas?
Thanks.
Brian Munz

Oct 7 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
br********@gmail.com a écrit :
I have a page that has 3 different iframes in it. The bottom iFrame
continually gets updated as the user adds different images to it
through the interface, and once the user clicks one of the images, I
change the style of the image to put a border around it.
The problem is, once I set off this function to put a border around the
clicked image, the iFrame resets itself. So, if I've scrolled over to
the right a bit and clicked on a pic, the frame resets itself all the
way to the left, so the user would have to scroll back over to see the
pic they just clicked.
Can you post an url where all of this description happens? Over here,
it's kinda difficult to follow you or to examine the precise code you
use and to examine what your code does exactly.
I've tried doing an onFocus in the function that adds the style, and
it's not working.
There is no onfocus event attribute for img.
http://www.w3.org/TR/html4/struct/objects.html#edef-IMG
identity=document.getElementById(picid);
identity.focus();
There is no focus method for HTML img element:
http://www.w3.org/TR/DOM-Level-2-HTM...ml#ID-17701901

Any ideas?
Thanks.
Brian Munz


Just post an url.

Gérard
--
remove blah to email me
Oct 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.