[eluser]Hana[/eluser]
Hello,
In my view, I display results from a DB query.
I can select (check) some objects to disable them.
What I need: I would like to print when the user clicks on "Disable" a "pop-up", which says:
"object 1
object 2
object 3
... will be disabled. Are you sure?"
YES - NO
I found this, onclick="return confirm('disable[]')" but impossible to put the value of disable[]
Any ideas? :-)
Thank!!!
Code:
<?php echo form_open('GP/ObUsersAdm/disable',$attributs); ?>
if ($Users)
{
foreach($Users as $index=>$item)
{
echo " <tr>
<td><input class='select' type='checkbox' name='disable[]' value='".$item[0]."' id='$item[0]'></td>
<td>".$item[2]."</td>
</tr>";
}
}
else
{
echo "No result.";
}
?>
</tbody>
</table>
<input class="validator" type="submit" value="Disable selected" name="submit" />
(In the controller I obtain the value with $_POST("disable")