johnmayer
08-29-2002, 06:54 AM
I am trying to make it possible to change the property of a css box with a link (or preferably select / input form field)
this is what I have so far JS wise:
function border(bvalue) {
if (!document.all) {
document.getElementById('example').style.border = bvalue;
}
}and how i am trying to put it into action:
<a href="javascript:border('solid')">Solid</a>
<a href="javascript:border('1px')">1px</a>
<a href="javascript:border('2px')">2px</a>
<div id="example"></div>
this is what I have so far JS wise:
function border(bvalue) {
if (!document.all) {
document.getElementById('example').style.border = bvalue;
}
}and how i am trying to put it into action:
<a href="javascript:border('solid')">Solid</a>
<a href="javascript:border('1px')">1px</a>
<a href="javascript:border('2px')">2px</a>
<div id="example"></div>