javascript - Div closes automatically -


click on button sends value url should open div. opens div , automatically div closes. want prevent closing div automatically

button

<td><center><button type="button" id="item" class="btn btn-default btn-sm" onclick="myfunction(this)" value="<?php echo $id ;?>"> <i class="icon-pen"></i></button></center> </td>   

script below works, pick values table , send url, open div, div closes fast.

<script>     function myfunction(object) {          var y = $(object).parent("center").parent("td").parent("tr").find(".nr center").text();         var x = $(object).attr("value");                  window.location.href = "korpa.php?w1=" + x + "&w2=" + y;           document.getelementbyid('izmjenadiv').style.display = "block";     }  </script> 


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -