TangLung
06-08-2003, 02:45 AM
Anybody knows how to remove the dotted line surrounding an image when clicked? I heard it can be done...
Thanks !
Thanks !
|
Click to See Complete Forum and Search --> : No dotted line script TangLung 06-08-2003, 02:45 AM Anybody knows how to remove the dotted line surrounding an image when clicked? I heard it can be done... Thanks ! AdamGundry 06-08-2003, 03:25 AM You can use this: <img onclick="this.blur()"> I'm not sure how this fits with accessibility requirements, however. Adam TangLung 06-08-2003, 04:48 PM Thanks for the help, Adam, but this won't work. What I need is a script that removes the dotted line surrounding an image "when you click on it." The image obviously is a link. This appears in IE. I'm not quite sure if it also appears in Netscape. brendandonhue 06-08-2003, 06:25 PM Try <img src="blah" border="0"> Not sure if thats what you meant... Vladdy 06-08-2003, 06:29 PM putting a script like that is a potential lawsuit.... Scriptage 06-08-2003, 07:42 PM <a href="#" id="dummy" onFocus=this.blur()></a> <script> var activeLink=""; function swapLink(theHREF){ activeLink=theHREF; document.all["dummy"].focus(); } function executeLink(theHREF){ location.href=theHREF } function alerter(){ alert("hey") } </script> <a href="java script:alerter()" id="link1" onMouseDown=swapLink(this.href) onMouseOut=swapLink("") onMouseUp=executeLink>alert</a> <br /> <a href="test.html" id="link2" onMouseDown=swapLink(this.href) onMouseOut=swapLink("") onMouseUp=executeLink>page</a> As you can see it works with normal links and js links. Basically when the user presses the mouse down on the link the href is cached and the focus is sent to a dummy link with no visible text. When the mouse is released the executeLink function is executed which executes the link. Scriptage 06-08-2003, 07:46 PM You are right Dave. I'm fed up with people telling me what to put on my webpage and how I should go about coding it...a webpage is a very personal thing and I don't particularly mind if a deaf, half blind, retarded midget wants to view my site. I'm not going to spend 6 months coding so that I can make my website 100% accessible to every disorder, when 99.9% of people coming to my site are "normal". Regards brendandonhue 06-08-2003, 07:48 PM Scriptage-Charle's may overdo it sometimes, but he uses facts. You need to watch what you say about the disabled. That is by far THE most disrespectful thing I have read on this board. Scriptage 06-08-2003, 07:51 PM nothing disrespectful at all, look up the words I've used in the dictionary, you'll find that it's all correct English, and is in no way disrespectful if taken by it's proper (not slang) meaning. Regards pyro 06-08-2003, 08:00 PM Originally posted by Scriptage document.all["dummy"].focus(); document.all is IE only, better off using document.getElementsById or document.links Scriptage 06-08-2003, 08:01 PM True Dave, and I appologise if I have offended anyone. It is just annoying when someone comes up with an original, creative piece of code and you find 500 lines of ranting from Charles; If he wants true cross browser compatibilty, and accessibility for disabled people shuldnt he really be programming in ECMA script and not Javascript? Scriptage 06-08-2003, 08:04 PM yeah pyro you are right...thanks for pointing it out :D Vladdy 06-08-2003, 08:11 PM Originally posted by Dave Clark Hey, perhaps I'm just naive enough to allow someone to learn something first. So shoot me! :rolleyes: Dave The discussed functionality is one of the most useless things one can put on a web page. It serves absolutely no purpose. If you, Dave, used some discretion in what you teach those who do not have enough knowledge to make the right judgement by themselves, the web would be a more friendly place. Scriptage 06-08-2003, 08:14 PM Excuse me but am I correct in saying that the function of this board is to give people help in how to code things that they request? If you have no desire to help people then you really shouldn't be visiting this board. If you go into a shop and ask for a cricket bat would you expect to be told that you cannot have it because someone without fingers won't be able to use it???? Dave is an excellent programmer and from what I have seen of his posts on this board is only here to help. So once again, if you aren't here to help, go away! Grow up. pyro 06-08-2003, 08:19 PM It's quite possible that it is time for this thread to be closed. Vladdy, as well as Dave, are very respected members of our forums, and both have numerously provided very helpful information... It's one thing to debate web accessibility and another to attack fellow members. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |