Can anyone tell me why my javascript function works for my button "onclick" but will not work from a php echo? The code is below. Thank you!
This works:
<button onclick="activate_modal('info')">This Works!</button>
But this does not:
<?php
if(1==1){
echo "<script type='text/javascript'>";
echo "activate_modal('info');";
echo "</script>";
}
else{
}
?>