Click to See Complete Forum and Search --> : How Do I Deselect The Button?


chestertb
10-11-2003, 12:16 PM
I have a page that uses images as buttons... nothing special about that.

When I click an image, it simply changes a number of other images on the page. That part all works just fine.

Except...
When you click an image that is a button, the browser draws a dotted border around the button area, and leaves it there until the user clicks elsewhere on the page.

At the moment, the Javascript function is called from href as follows...

<a href="javascript:select('x')".......

and select() loads images, calculates where to put them, draws them, turns others off etc.

Is there a way to turn the dotted button area border off after the function executed?

Thanks
IB

BestZest
10-11-2003, 04:14 PM
You can't stop the border appearing, but you might be able to lose it be calling
this.blur()
after the other actions.
Hope this helps

BestZest

chestertb
10-11-2003, 10:53 PM
Thanks... works a treat in Netscape, but in MSIE, it pushes the IE window into the background.

I'm sure that's just a syntax problem, so I'll look in that direction.

Thanks for the help.

IB

BestZest
10-13-2003, 03:02 PM
Always happy to help! ;)

You might be able to stop the IE window disappearing by instead of calling this, call the absolute path eg.
document.images[3].blur()
You would need to change this for all the different images, and remember, image indexing begins at 0.

BestzZest