Thank You for the quick respond. I want to check all of these radio buttons
<input type=radio name=aid value=".$row->aid."id=".$row->id.">
<input type=radio name=qid value=".$row->qid." id=".$row->id.">
<input type=radio name=id value=".$row->id." id=".$row->id.">
<input type=radio name=id2 value=".$row->id2." id=".$row->id.">
byClick this image
<img id=".$row->id1." src=images/btn.png width=50 height=50
onclick=RadioClicked('".$row->id."','aid','MyFormID') style=cursor:pointer;>
</input></input></input></input>
Thanks again i really appreciate for the help. note: I use the image for radio button interface and hide the radio buttons visibility.
Here is the Javascript code:
<script type="text/javascript">
var RadioCheckedImage = new Image();
var RadioUncheckedImage = new Image();
RadioCheckedImage.src = "images/btn1.png";
RadioUncheckedImage.src = "images/btn.png";
function RadioClicked(radioid,radiosetname,formid) {
var form = document.getElementById(formid);
for( var i = 0; i < form.length; i++ ) {
if(form[i].name == radiosetname) {
document.getElementById(form[i].id).checked = false;
document.getElementById("Image"+form[i].id).src = RadioUncheckedImage.src;
}
}
document.getElementById(radioid).checked = true;
document.getElementById("Image"+radioid).src = RadioCheckedImage.src;
return false;
}
</script>
Here is the PHP code:
These code bellow were fine, i can check this radio button by clicking the image.
'while ($row = mysql_fetch_object($result)) {
echo "<table><tr><td>
<input type=radio name=aid value=".$row->aid." id=".$row->id." checked>
<img id=".$row->id1." src=images/btn.png width=50 height=50
onclick=RadioClicked('".$row->id."','aid','MyFormID') style=cursor:pointer;>
</input></td>'
But i need to add another radio button (below) also check as the image above click
<input type=radio name=id value=".$row->id." id=".$row->id.">id</input>
<input type=radio name=qid value=".$row->qid." id=".$row->id.">qid</input>
<input type=radio name=id2 value=".$row->id2." id=".$row->id.">id2</input>
} }
Here is a screen shot that i want. i want to check 4 radio buttons as i click the push button image. note:In this screen shot i had to click 3 radio buttons manually.
o o o o push image
o o o o push image
- PUSH IMAGE
o o o o push image
o o o o push image
-SEND BUTTON-