My form has four radiobuttons that I covered with images using position:absolute.
Then i wrote a function saying that if an image was clicked, it should get a border and the radiobutton should be checked.
It works in chrome and firefox, but in IE nothing happens!
Does someone know if maybe the code I’m using isn’t supported by IE? Or if there’s a better solution for replacing a radiobutton with an image?
I have four radiobuttons that look like this one:
[code=php]
<div class=”struktur”><img src=”Mallar/Mall1.jpg” id=”str1″ />
<input type=”radio” name=”struktur” value=”Ex1″ id=”radio1″
<?php if ($_POST[‘struktur’] == “Ex1”) { echo ‘checked=”checked”‘;} ?>>
</div>
And the function:
[code=php]
<script type=”text/javascript”>
str1.onclick = function () {
str1.style.border=”thick solid #933396″;
str2.style.border=”none”;
str3.style.border=”none”;
str4.style.border=”none”;
radio1.checked=true;
}
</script>
Help very much appreciated!