I know i made lots of mistake thats why I come to here. Actually I have some data
According to data I have Indication 1, Indication 2, Indication 3 and Indication 4, for each indication there is some message for user and if I select 2, 3 or 4 then the message will move to that corrosponding indication. And really I dont have idea how to do it becouse these message are coming from dynamicaly as:
$i=1;
while($row=mysqli_fetch_array($qry))
{
?>
<div class="solo"><div style=" width:100px;height:24px;float:left;padding:4px ;">
<select style="width:60px;font-size:14px;" onchange="move(this.value);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<!--<option value="60min">60min</option>
<option value="other">other</option>-->
</select>
</div>
<div style=" width:600px;height:24px;float:left;padding-top:8px;text-align:center;"> <?php echo $row['message'];?></div>
<div style=" width:100px;height:24px;float:left;padding:4px ;">
<div style="width:100px; float:left;">
<input style="float:left;" type="checkbox" value="<?php echo $row['id']; ?>" id="<?php echo $row['id']; ?>" name="foo[]"/><div style="padding:2px; float:left;"><a href="delete.php?q=<?php echo $row['id']; ?>" onclick="return del();">Kill</a></div>
</div>
and I am using to get these message id
<script type="text/javascript">
function move(str)
{
var a=document.getElementsByClassName("mid")[0].value;
alert(a);
}
</script>
and i display this message id as in hidden text box:
<input type="hidden" name="msg" class="mid" value="<?php echo $row['id']; ?>">
am just confuse how to get a particuler message id for each message becouse above move()
function is only giving one id by [0]
So I just want to know how to do this for each element when all the input box have same class.