Hi!
My over all goal is to allow the user to click one and only one element from each of the three sets(mileage, electricity, hydrogen. The user can change their mind and pick another one from that set. When one is selected, styling is turn on and others off. Like the radio-button form input behavior of only picking one.
I am trying to style the border of this element when the transparent layer above is clicked. It is not working ! Can anyone see what I am doing wrong? I am not getting any errors.
I created a transparent element (layer RectHotSpot.) When the mouse is clicked on this, it runs the Javascript function (btn100()) that contains the following code:
function btn100(hypeDocumnet, element, event) {
console.log(‘entered100btn’);
hypeDocument.getElementById('100toBorder').style.borderWidth = "3";
hypeDocument.getElementById('100toBorder').style.border = "3 solid #438730";
// turn off border styles off for other two,
//hypeDocument.getElementById('200toBorder').style.borderWidth = "0";
//hypeDocument.getElementById('200toBorder').style.border = "none";
//hypeDocument.getElementById('300toBorder').style.borderWidth = "0";
//hypeDocument.getElementById('300toBorder').style.border = "none;
mileageSelected = '100';
}
I want to style the element below it (RectAddBorder) with the styles in the function. Visibility for this element is on.
I’m open to ideas on how to handle this “only one”, radio button like behavior if anyone has a good idea.
I tried a different technique with the Yes No buttons. Styling when Pressed, but the borders don’t stay one when mouse leaves button area.
Thanks!
<a class=“attachment”
prototypeV3newCalcSetA.zip (75.4 KB)