Reputation: 24052
$("[propertyname]").change(function()
{
if($(this).attr("propertyname") == "Fees.ProfitAmount") {
if($("#Fees_ProfitType:checked").val() == 29751)
{
FormatAsMoney(this, 10000000000, true);
}
}
UpdateField(this, false);
if($(this).attr("propertyname") == "Fees.CalculationSource") {
SetFixedRate();
}
if($(this).attr("propertyname") == "FloatingComponent.IndexID") {
FillIndexDescription();
UpdateResetEnabled();
}
if($(this).attr("propertyname") == "FloatingResetType" ||
$(this).attr("propertyname") == "ResetDay" ||
$(this).attr("propertyname") == "ResetDayComponent.RateResetFrequency")
{
UpdateResetEnabled();
}
SetSaveAsNew(this);
});
Specifically the money formatting doesn't take place in IE, but I can see it being called in Firefox.
The above works in Firefox but not IE7 or IE8, can anyone tell me why?
Upvotes: 1
Views: 118
Reputation: 38309
It appears you have stumbled upon this problem.
When checking the value of a checkbox, IE will return "on" rather than "29751". To see the actual value you need to use attr("val")
instead, like so:
if($("#Fees_ProfitType:checked").attr("val") == 29751)
Upvotes: 1