Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image map focus outline removal 1

Status
Not open for further replies.

tsdragon

Programmer
Dec 18, 2000
5,133
US
How do you remove the dotted line that appears around the area of an image map when you click on it? It isn't necessay, and looks terrible. I tried the hidefocus attribute, but it didn't work.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Actually, I'm using FlashPeak SlimBrowser, but it uses the IE browser engine (I use it because I need IE features, but like a tabbed browser). My version of IE is 6.0, so that should be what I'm using. Apparently the hidefocus attribute just doesn't work for imagemap areas.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Tracy,

Another way of getting tabbed browsing using the IE rendering engine is to use the IE Tab plugin for Firefox.

It is very good - you can switch between IE and Firefox on-the-fly for any page, and even give a list of URLs that should always open in IE, like the Windows Update pages, MSDN, etc.

All the IE rendering works as you would expect, including filters, and you also get the bonus of being able to check your pages in Firefox as well with one click (or rather, you can look at your pages in Firefox, and check them in IE with one click ;o)

I'm not suggesting you change, but it's certainly another alternative.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Aaah - if you put the hidefocus attribute on the image, and not the area elements, all works as expected:

Code:
<img src="whatever.gif" width="250" height="500" border="0" usemap="#map" hidefocus="true" />

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I thought I had tried putting the hidefocus on the image tag as well, but I tried it again and it works! I think the problem is that I'm doing the site under DotNetNuke, and the default HTML editor is worthless. It stripped the value part of the attribute when on the area tags, and I think it removed it entrirely from the image tag. I installed FCKEditor instead (and the wonderful service provider by Locopon's DNN and it works beautifully. It's much easier to work with, and generates proper XHTML (it even changed hidefocus="true" to hidefocus="hidefocus" which I'm guessing is the proper XHTML way to do it.

As far as using the keyboard instead, I'm planning on providing a list of links (there are only 10) as well.

I do use FF now and then. I used to use it a lot, but for some reason when I upgraded to XP and installed it I had trouble with it. I can't get it to open a page in a new tab, it wants to open a new window instead. I tried everything I could think of, and finely just said "to heck with it" and went back to IE. That's all we develop for at work anyway.



Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
P.S. According to the MSDN web site, hidefocus isn't an attribute of the image tag at all, just the area. Guess they don't always know what they're talking about, even on their own extensions. Big surprise.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
The odd thing is, it doesn't matter what you specify as the value of the attribute, as long as it is present. That casues some confusion if you have:

Code:
hidefocus="false"

Which still hides the focus!

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I noticed myself that it doesn't matter what the value is, as long as it is not an empty string or null. Still, I think the standard is hidefocus="hidefocus". There is another attribute that works similarly, but I can't remember which one. It can lead to some confusion. I think "true" and "false" would be more intelligent options, since it's strictly an on/off option.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top