dimanche 25 décembre 2022

How to stop calling function when user click on checkbox

I have on table row. In table row I have checkbox and many other information. Now, I am supposed to open another page while click on row. But need to perform another function while click on checkbox. Here checkbox is also part of the row hence if i am going to click on the checkbox it will open the another page assigned to on click of row.

<tr onclick="window.location='openticket.php';" class="cursor1">
        <td>
        <div class="classic">
             
        <div class="row ms-2" id="<?php echo $i['id']; ?>" onmouseover="display(<?php echo $i['id']; ?>)" onmouseleave="display2(<?php echo $i['id']; ?>)">
            
            <div class="col-1 mt-1 returnhide" id="hidecheckbox<?php echo $i['id']; ?>" style="display:none;">
            <div class="form-check">
            <input class="form-check-input checkboxcheckvalueofrow" type="checkbox" id="cb<?php echo $i['id']; ?>" name="ticketcheckbox[]" value="<?php echo $i['ticket_id']; ?>">
            </div>
            </div>
        </td>
        
        <td>Database issue</td>
</tr>   

This is my code. Openticket.php page should not open if i click on the checkbox. How to do it?




Aucun commentaire:

Enregistrer un commentaire