modal appear after notice

Asked

Viewed 149 times

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?

  • Yes... it’s all built... I just need modal to open automatically....

  • You want when the div calling for appear the modal be open too? (to see if I understand rsrs)

  • Hello Luíne... This... the modal open when the div is called... Just this to finish this stage of the project...rs

  • @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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.