Hello,
Very new to jQuery, but trying to use it to help me with a SharePoint coding solution. I have 6 drop down selection fields that allow the user to select a value between 5 and 100 by 5s. If the sum is over 100 the user should get an alert saying hey you are over 100% allocated
[script removed]
[script removed]
});
function yourCalcFunction() {
var column1Value = parseFloat($("input[ le='Deal 1 Allocation']").val());
var column2Value = parseFloat($("input[ le='Deal 2 Allocation']").val());
var column3Value = parseFloat($("input[ le='Deal 3 Allocation']").val());
var column4Value = parseFloat($("input[ le='Deal 4 Allocation']").val());
var column5Value = parseFloat($("input[ le='Deal 5 Allocation']").val());
var column6Value = parseFloat($("input[ le='Deal 6 Allocation']").val());
var column7Value = parseFloat($("input[ le='Other Allocation']").val());
var totalValue = column1Value + column2Value + column3Value + column4Value + column5Value + column6Value + column7Value;
if(totalValue > 100) alert("Hey Knucklehead you can not be allocated more than 100%");
}
[script removed]
Sample code for Allocation field
<SharePoint:FormField runat="server" id="ff21{$Pos}" ControlMode="Edit" FieldName="Pct_x0020_Alloc_x0020_1" __designer:bind="{ddwrt<img src='desktopmodules/ntforums/images/emoticons/biggrin.gif' height='20' width='20' border='0' le='Big Grin' align='absmiddle'>ataBind('u',concat('ff21',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Pct_x0020_Alloc_x0020_1')}"/>