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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -