Commit e97934e03b5a38840ad34cd29080ee4e126e4f8c

Authored by Azusa Kawakami
1 parent 37a149e698
Exists in master

emergency button

Showing 1 changed file with 11 additions and 2 deletions Side-by-side Diff

views/pages/landing.ejs View file @ e97934e
... ... @@ -119,7 +119,7 @@
119 119 </div>
120 120 <!-- Emergency -->
121 121 <div class="col-xs-4">
122   - <button type="button" class="btn btn-danger btn-block" onclick="todo()">Emergency</button>
  122 + <button type="button" class="btn btn-danger btn-block" onclick="emergency()">Emergency</button>
123 123 </div>
124 124 <!-- Open Map -->
125 125 <div class="col-xs-4">
126 126  
... ... @@ -130,8 +130,17 @@
130 130  
131 131 </div>
132 132  
  133 +<script>
  134 + function emergeny(){
  135 + var res = confirm("You are in a dangerous area. Would you like to call 911?");
  136 + if( res == true ) {
  137 + <a href="tel:+1-911">call 911</a>
  138 + }
  139 + else {
  140 + alert("Please stay safe!");
  141 + }
  142 + }
133 143  
134   - <script>
135 144 function todo() {
136 145 alert("This button is brought to you by the wonderful Wizard of Oz.");
137 146 }