0

I am new to coding and i am implementing chatbot and it's working fine in chrome. But when i am trying in mozilla and edge and when i am giving input it's not taking input. Below is error i am getting when i inspect element in edge. Can anyone please tell what i am doing wrong and please tell me if any changes required in code.

enter image description here

Here is my html code.

// Get the modal
var newmodal = document.getElementById('myModal');

// Get the button that opens the modal
var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks the button, open the modal 
btn.onclick = function() {
  newmodal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
  newmodal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
  if (event.target == modal) {
    modal.style.display = "none";
  }
}
.newmodal {
  width: 300px;
  background-color: white;
  position: absolute;
  bottom: 41px;
  right: 43px;
  display: none;
}

.click-meq {
  height: 60px;
  width: 60px;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

img {
  position: fixed;
  bottom: 15px;
  right: 15px;
  height: 60px;
  width: 60px;
}

.click-me1 {
  height: 40px;
  background-color: blue;
  color: white;
  width: 300px;
  position: absolute;
  bottom: 0;
  right: 10px;
}
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


<div class="container-fluid">
  <div class="newmodal" id="myModal">
    <div class="close-btn">
      <span class="close">&times;</span>
    </div>

    < "MY Iframe Here">
  </div>
  <button class="click-me" id="myBtn"><img src="C:\Users\Resemble\Downloads\chat1.png"></button>
</div>
mplungjan
  • 169,008
  • 28
  • 173
  • 236
Harinath
  • 33
  • 4

0 Answers0