I have two JavaScript files:
I also use a thick box (Ajax call)
in Main.js
$(document).ready(function() { var cnt=0; $("#btnPmt").click(function(){ cnt=cnt+1; tb_show('Void Transaction','pmt.jsp?height=310&width=400', null); }); });
The Pmt.js file is included in pmt.jsp as
<script src="js/Pmt.js" type="text/javascript"></script>
in Pmt.js
$("#btnPmtClose").click(function(){ cnt=0; parent.tb_remove(); });
How can we reset the var cnt value in Pmt.js , which is decal in Main.js ? The above does not work, when I close the thick box, I find the increased value, not the zero set when closing, even the Ajax call.
source share