Online Shopping : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

17 of 23 people (74%) answered Yes
Recently 6 of 10 people (60%) answered Yes


How do I get rid off the dashed focus when selecting an element and draging it ?

Jul 6th, 2009 11:01
khalid khalid, haytham ali, ha mo, Colin Snover, Colin Fraser, Alon Kabalo,

I'm not sure if you're talking about dragging objects, selecting text 
and images, or clicking on links, so I'll do all three.
If you're referring to dragging objects, you can't stop it.
If you're referring to selecting text and images, you can add this 
simple code to your <body> tag:
onSelectStart="return false"
Of course, like a lot of Javascript, this code won't work in Netscape. 
If you're referring to the ugly border that appears around links, add 
this code to your <a> tags:
Hope this helped!!