I am creating a "pop up" type pop-up window (as if it were a confirm () but I want instead of having the typical OK-Cancel buttons, have the values: Button1 - Button2, and each do X code. ..
I have the following code in the index.php:
echo "<td onclick='cambiar_estado(this);' width=\"08%\" id=\"".$row['ID_OBLIGATORIO']."\">" ?>
<!-- Columna ESTADO del usuario. -->
<center>
<?php
$estado = 1;
echo "<a href='#' data-toggle='modal' data-target='#modal_cambiar_estado' data-id='\"".$row['ID_OBLIGATORIO']."\">' class='cambiar_estado' onclick='cambiar_estado(this);'>";
echo "<img src=\"/imagenes/".$row['estado'].".gif\">";
echo "</a>";
?>
</center>
<?php
echo "</td>";
Now what I want is a function to load buttons 1-2, do I have to create those botons in Javascript? Or I could do the creation at the same time I created the pop up with the following code:
<button type="button1" class="btn btn-info btn-lg" data-toggle="modal" data-target="#boton1">Boton1</button>
The same for the button2.