This code is not working in IE8 Browser.. but works in Firefox
- by rockers
$('#PbtnSubmit').click(function(event) {
$('#PricingEditExceptions input[name=PMchk]').each(function() {
if ($("#PricingEditExceptions input:checkbox:checked").length > 0) {
var checked = $('#PricingEditExceptions input[type=checkbox]:checked');
var PMstrIDs = checked.map(function() {
return $(this).val();
}).get().join(',');
$('#1_exceptiontypes').attr('value', exceptiontypes)
$('#1_PMstrIDs').attr('value', PMstrIDs);
} else {
alert("Please select atleast one exception");
event.preventDefault();
}
});
});
I am sending exceptiondis to the Controler to handle the update.. this is my Begin form..
<script type="text/javascript">
var exceptiontypes = $.cookie("exceptiontype");
</script>
<% using (Html.BeginForm("MassUpdate", "Pricing", FormMethod.Post, new { @id = "exc-"}))
{ %>
<input type="hidden" id="exceptiontypes" runat="server" />
<input type="hidden" id="PMstrIDs" value="" runat="server"/>
<%= Html.ValidationSummary(true)%>
I am retreving the ExceptionId;s controler side is like this..
var exceptionIds = Request.Form[1].Split(',');
var exceptiontype = Request.Form[0];
how ever this is working in firefox not in IE8.. Ie8 I am getting only Frist ExcdptionId not all checkbox exceptions ids;
thanks