472,354 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

how to force browser focus to area map?

The enclosed html snippet displays an area map. The behavior I want
is for each area to show up (eg show the outline of the poly) when the
user mouses over it. This happens nicely BUT in order for this to
occur, the user must hit the tab key to set the focus into the image
(or the map -- I am not sure which at this point).
In any case, I need a way to automatically force the browser focus
into the image (or map) -- because end-users do not understand about
using the tab key to move browser focus when there is no obvious form
in front of them.
So far I have tried several different permutations using focus() and
setActive() and had no success.

And lastly, yes, an IE-specific solution is just-fine-thank-you.
Thanks in advance for your help

---------------------------code begins-------------------------
<html>
<body>
<img src="combo1.png"
onMouseOver="document.getElementById('mymap').setA ctive()"
usemap="#mymap"/>
<map name="mymap" id="mymap">
<area alt="1" title="1" shape="poly" coords="60,15,90,15,90,35,60,35"
tabindex="1"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
href="#" target="_self" />
<area id="area1" alt="2" title="2" shape="poly" tabindex="2"
coords="90,120,110,120,110,140,90,140" href="#" target="_self"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
onclick="javascript:alert(window.event.srcElement. tagName);window.event.srcElement.focus()"
/>
</map>
</body>
</html>
------------------------------code ends-------------------------
Jul 20 '05 #1
2 8149
Well, personally for me in ie 5.5 this code seems to do what you request.
Even without the focus being on the image (just on the area)

What browser are you using? It doesn't seem to work in ns 4.75 though, but
that isn't a suprise really.

Maybe that helps......what is it not doing for you? it's
highlighting/focusing on mouseover the area and dehighlighting/bluring on
mouseout of the area.

Stu

"Charles Eubanks" <ce******@alphablox.com> wrote in message
news:df**************************@posting.google.c om...
The enclosed html snippet displays an area map. The behavior I want
is for each area to show up (eg show the outline of the poly) when the
user mouses over it. This happens nicely BUT in order for this to
occur, the user must hit the tab key to set the focus into the image
(or the map -- I am not sure which at this point).
In any case, I need a way to automatically force the browser focus
into the image (or map) -- because end-users do not understand about
using the tab key to move browser focus when there is no obvious form
in front of them.
So far I have tried several different permutations using focus() and
setActive() and had no success.

And lastly, yes, an IE-specific solution is just-fine-thank-you.
Thanks in advance for your help

---------------------------code begins-------------------------
<html>
<body>
<img src="combo1.png"
onMouseOver="document.getElementById('mymap').setA ctive()"
usemap="#mymap"/>
<map name="mymap" id="mymap">
<area alt="1" title="1" shape="poly" coords="60,15,90,15,90,35,60,35"
tabindex="1"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
href="#" target="_self" />
<area id="area1" alt="2" title="2" shape="poly" tabindex="2"
coords="90,120,110,120,110,140,90,140" href="#" target="_self"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
onclick="javascript:alert(window.event.srcElement. tagName);window.event.srcE
lement.focus()" />
</map>
</body>
</html>
------------------------------code ends-------------------------

Jul 20 '05 #2
I am running IE6. I will try this on 5.5 and/or 5.0 to see if
anything is different. The code I included is simplified since there
are items surrounding the image. But so far even this simple version
does not seem to work unless the I click on the image and then hit the
tab key.
Thanks for your time.

"Stuart Palmer" <tr**********@youcant.com> wrote in message news:<bp***********@sp15at20.hursley.ibm.com>...
Well, personally for me in ie 5.5 this code seems to do what you request.
Even without the focus being on the image (just on the area)

What browser are you using? It doesn't seem to work in ns 4.75 though, but
that isn't a suprise really.

Maybe that helps......what is it not doing for you? it's
highlighting/focusing on mouseover the area and dehighlighting/bluring on
mouseout of the area.

Stu

"Charles Eubanks" <ce******@alphablox.com> wrote in message
news:df**************************@posting.google.c om...
The enclosed html snippet displays an area map. The behavior I want
is for each area to show up (eg show the outline of the poly) when the
user mouses over it. This happens nicely BUT in order for this to
occur, the user must hit the tab key to set the focus into the image
(or the map -- I am not sure which at this point).
In any case, I need a way to automatically force the browser focus
into the image (or map) -- because end-users do not understand about
using the tab key to move browser focus when there is no obvious form
in front of them.
So far I have tried several different permutations using focus() and
setActive() and had no success.

And lastly, yes, an IE-specific solution is just-fine-thank-you.
Thanks in advance for your help

---------------------------code begins-------------------------
<html>
<body>
<img src="combo1.png"
onMouseOver="document.getElementById('mymap').setA ctive()"
usemap="#mymap"/>
<map name="mymap" id="mymap">
<area alt="1" title="1" shape="poly" coords="60,15,90,15,90,35,60,35"
tabindex="1"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
href="#" target="_self" />
<area id="area1" alt="2" title="2" shape="poly" tabindex="2"
coords="90,120,110,120,110,140,90,140" href="#" target="_self"
onMouseOver="this.focus();"
onMouseOut="this.blur();"

onclick="javascript:alert(window.event.srcElement. tagName);window.event.srcE
lement.focus()"
/>
</map>
</body>
</html>
------------------------------code ends-------------------------

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of...
2
by: S P Arif Sahari Wibowo | last post by:
Hi! Do you know how to put a form's Access-Visual-Basic-code that will force the form to be inserted, while the user has not type anything in the form, without changing focus, selection, etc.? ...
5
by: annagel | last post by:
I am looking for a way to force a Tkinter window into focus on a system level. I know the force focus method should bring one window of my application into focus, but it seems I need to have some...
1
by: Alex Calder | last post by:
How's that for a subject line? :) OK, here's the deal. I have a web page that features a Flash movie about halfway down the page, and inside that Flash movie is content that typically...
11
by: sheldonlg | last post by:
I have a problem with not seeing the current focus while in a particular screen in a my app. The focus does not show for a type=text or textarea. I have tried to reproduce this problem in a test...
7
by: paulcybulski | last post by:
I want to have the flash document have focus when the page initially loads...so the user can use the mouse scroll wheel to zoom in and out on the map that is on stage...(without having to click...
2
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello experts, I posted a disturbing question in here:...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

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.