473,322 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

focus( ) problem

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
1 1365
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: CES | last post by:
All, I'm having a problem returning focus back to an input field in Netscape. The code works in IE and Opera but not in netscape6+. Basically I have a function that is called upon...
2
by: Paul Thompson | last post by:
I am trying to use various javascript tools, all of which work in NN, to work in IE. Here's my latest annoyance. I get a list of all objects on a page using docContents =...
2
by: Iver Erling Årva | last post by:
I have this window where I open a modal dialog window using the code: newwin=window.showModalDialog(url, "popup", features) where features are ...
1
by: avnrao | last post by:
Hi, I am facing a problem with control.focus (javascript). Here is the description of the issue. 1. I have 2 aspx files. on Aspx1 I have button named NewRow. Clicking on this, will redirect...
1
by: prabuinet | last post by:
hi, I added a form as a control on another form. After adding i want the embedded form to have focus. I tried all combinations but its not working.. Do any one know how to do this. ...
3
by: ngkuhlmann | last post by:
I have a strange problem. I have a tab control with 5 tabs. When I click one of the tabs the tab show its information just fine, however when I test the focus, without moving and within a timer...
1
by: Werner Schmidt | last post by:
Dear group, I have a very strange behaviour: In a loop there are several TextBoxes initialized: TextBox objTextBox = null; // one declaration for-loop // multiple initialisations
3
by: jan.loucka | last post by:
Hi, I looked around for this specific problem but could not find any answer - there's few things in VB but still nothing exactly like this so I'd appreciate any help. We're writing C# WinForm...
0
by: =?Utf-8?B?SWdvcg==?= | last post by:
Hi everyone! I have some strange behavior of ListView control in WPF. We are developing application in C#. I created ListView with some items and set SelectedIndex to some index in the...
1
by: Drelus | last post by:
I'm using an Ajax call to open a search box in the page and I want the focus to go to the box automatically. So, in the httpObject.responseText, I tried sending the following in addition to the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.