1
Colleagues.
I have a chat on a project, but I want to go further. I want user I when calling user II to receive a notification of the modal bootstrap. The initial idea is to create status in the database and user II upon receiving the invitation would change the status, e.g. invitation C and the modal would appear. So I want to put inside a div an ex call.:
if($statusChamada == 'C'){
?>
<div id='chamada'>Abrir o modal</div>
<?php } ?>
and Jquey:
setInterval(function() {
$("#chamada").load(location.href+" #chamada");
}, 1000);
So far so good, so good... but how would you make the bootstrap modal open automatically?
You already have the code that queries the bank and checks if you have a pending call or not?
– Eduardo Silva
Yes... it’s all built... I just need modal to open automatically....
– user24136
You want when the
div
calling for appear the modal be open too? (to see if I understand rsrs)– Luídne
Hello Luíne... This... the modal open when the div is called... Just this to finish this stage of the project...rs
– user24136
@Fox.11 As you already check the status between ranges, when the condition is satisfied executes an onclick in the id of the <button> that calls the modal.
– Paulo Weverton