modal-sa.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!-- <style>
  2. .modal {
  3. display: none;
  4. position: fixed;
  5. z-index: 3;
  6. padding-top: 100px;
  7. left: 0;
  8. top: 0;
  9. width: 100%;
  10. height: 100%;
  11. overflow: auto;
  12. background-color: rgb(0,0,0);
  13. background-color: rgba(0,0,0,0.4);
  14. }
  15. .modal-content {
  16. background-color: #fefefe;
  17. margin: auto;
  18. padding: 20px;
  19. border: 1px solid #888;
  20. width: 80%;
  21. }
  22. .close {
  23. color: #aaaaaa;
  24. float: right;
  25. font-size: 28px;
  26. font-weight: bold;
  27. }
  28. .close:hover,
  29. .close:focus {
  30. color: #000;
  31. text-decoration: none;
  32. cursor: pointer;
  33. }
  34. </style> -->
  35. <!-- Trigger/Open The Modal -->
  36. <span id="myBtn" class="cursor-pointer"><i class="fas fa-bell"></i> Suchagent aktivieren</span>
  37. <!-- The Modal -->
  38. <div id="SearchAgentModal" class="modal" onclick="function hide(e){ e.style.display='None'; } hide(this);" >
  39. <!-- Modal content -->
  40. <div class="modal-content">
  41. <!-- {% now "YFdHi-u" %} -->
  42. <span id="agentClose" class="close">&times;</span>
  43. <iframe src="{% url 'search-agent-form-embed' %}?bz={{ product.ort }}" style="border:0px #ffffff none; width:100%;" name="myiFrame" height="600" allowfullscreen></iframe>
  44. </div>
  45. </div>
  46. <script>
  47. var modal = document.getElementById("SearchAgentModal");
  48. var btn = document.getElementById("myBtn");
  49. var agentSpan = document.getElementById("agentClose");
  50. btn.onclick = function() {
  51. modal.style.display = "block";
  52. }
  53. agentSpan.onclick = function() {
  54. modal.style.display = "none";
  55. }
  56. </script>