/    Sign up×
Community /Pin to ProfileBookmark

Stupid Button help

K, Its been a while since i did much coding on anything, but i swear ive overcome this problem before. i have a few buttons on my page using a javascript mouseover feature. problem is i cant seem to get rid of the damn dotted border that comes up when a button is selected:

IMAGE EXAMPLE:
[img]http://www.geocities.com/gunslingerdx/help.jpg[/img]

here is the code i have:

[code=html]
<script language=”JavaScript”>SecondImage20=’contact2.png’;</script>
<a href=”contact.html” target=”iframe1″ onMouseOver=”{OrigImage20=img20.src; img20.src=SecondImage20} ”
onMouseOut=”img20.src=OrigImage20″>
<img alt=”” name=”img20″ border=”0″ src=”contact.png” onLoad=”TempImage20=new Image(0,0);
TempImage20.src=SecondImage20″>
</a>
[/code]

feel free to tell me if my coding is overly sloppy. lol.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@ZeroKilledApr 10.2009 — the dotted border is a visual feedback indicating that the element has received focus. i don't remember if you can manage that on CSS, or if is cross-browser solution. however, on javascript you can blur an element when it receive focus but maybe some browser wouldn't allow it. keep in mind that the following code work only on elements that can receive focus. for instance, if you set the event on image tag, it would not blur.
<i>
</i>&lt;a ... onfocus="blur();"&gt;...&lt;/a&gt;
Copy linkTweet thisAlerts:
@KorApr 10.2009 — For accessibility reasons maybe it would be better to use [B]onmousedown [/B]and [B]onmouseup[/B]. Some people might not be able to use a mouse, thus for them the only way to navigate along the document could be by using the keyboard. In this case they [I]need to see the focus[/I] of the element. So that a solution could be:
<i>
</i>&lt;a href="#" onmousedown="this.blur()" onmouseup="this.blur()"&gt;
Copy linkTweet thisAlerts:
@gunslingerdxauthorApr 10.2009 — awesome. that worked perfectly, thank you
×

Success!

Help @gunslingerdx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...