<input type="button" onclick="return saveValues();" value="<?php echo "values" ?>" class="silver_button_big">
On the above to stop the multiclick i have tried something like this.
my_toggle_var = 0; // your global variable which u can use to play
function saveValues() {
if (my_toggle_var == 0)
{
ic.do.something();
my_toggle_var = 1; // You can move it up down based on your need....
}
},
something : function(){
//some code
//these code lead to run some jar file
// data insertion into DB(using mysql)
}
But this is unable to solve my problem in above case, i can say there may be some sort of browser cache problem. Can somebody help me out.
Just set disabled="disabled"
and readonly="readonly"
attributes:
// Attach the click handler
$(".silver_button_big").on("click", function() {
var $this = $(this);
// Disable button
$this.attr({"disabled": "disabled", "readonly": "readonly"});
// Do something async
setTimeout(function() {
// Enable the button back
$this.removeAttr("disabled readonly");
}, 1000);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="button" value="Click me" class="silver_button_big">
Note that it's recommended not to use empty attribute values.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments