dorarishome
asked on
JQuery Error and run twice
I have this code:
<script type="text/javascript">
var names_count = 0;
var c_count = 0;
var blocked_seats = 0;
names_count = 0;
c_count = 0;
blocked_seats = 0;
$(function () {
$('input#SaveBTN.link').click(function (e) {
e.preventDefault();
alert("HERE");
$('.Ctitle').each(function () {
if ($(this).val() != "Infant") {
c_count = c_count + 1;
//
}
});
//alert('namecount '+c_count);
names_count = c_count + 1;
blocked_seats = parseInt($('.seats').val());
//alert(blocked_seats);
$('.seats').val(blocked_seats - names_count);
// $("#New_booking_form").submit();
//alert(names_count);
names_count = 0;
c_count = 0;
blocked_seats = 0;
});
});
names_count = 0;
c_count = 0;
blocked_seats = 0;
</script>
I don't know whats wrong!
Hi,
could you please provide either a link to your site or add the html?
What error do you get?
It is impossible to debug this without the related HTML source.
Thanks.
KR
Rainer
could you please provide either a link to your site or add the html?
What error do you get?
It is impossible to debug this without the related HTML source.
Thanks.
KR
Rainer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER