2013-04-11 7:31, Scott Johnson wrote:
>>> <button style='width:200px; background-color: #6F2927; color: white;
>>> font-weight: bold; border: none;' onclick="displaySizes(this)"
>>> id="xyz">Click</button>
[...]
> Yeah I do not want the default border to show up after it has been
> clicked or not even important to have the border prior to clicking.
The code on the page seems to do rather the opposite: it removes the
default border initially but then adds a wider (3 pixels) border when
the button is clicked on.
If you use Developer Tools (press F12) in your favorite browser and
inspect a button element on the page, you will see that it indeed has
the markup quoted above, but after clicking, the element has changed.
The reason is that the onclick handler calls displaySizes(), passing the
button element as argument, and that function contains the assignment
oColor.style.border = "3px solid #6F2927";
where oColor is the argument of the function, so here it points to the
button element. And this causes the border to appear. To prevent that,
remove the assignment.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/