I have not tried that, but I did get this way to work:
if(parseInt(XDocument.DOM.selectSingleNode("//my:WeekTotal").text) > 40
if(parseInt(XDocument.DOM.selectSingleNode("//my:AfterTotal").text)!=(parseInt(XDocument.DOM.selectSingleNode("//my:WeekTotal").text)-40))
XDocument.UI.Alert("Your after hours are not all accounted for. Please
correct this in order to submit.")
----------------------------------------------------------------------------------------------
Now the tricky part is inserting it into this working existing code I have:
function CTRL186_7::OnClick(eventObj)
{
// Submit code
if(parseInt(XDocument.DOM.selectSingleNode("//my:WeekTotal").text) <= 35){
var clicked = XDocument.UI.Confirm("Your week total is under 35 hours. Do
you wish to continue?",1);
if(clicked == 1) {
XDocument.Submit();
XDocument.UI.Alert("Your status report has been submitted successfully.");
Application.ActiveWindow.Close();
}
}
else{
XDocument.Submit();
XDocument.UI.Alert("Your status report has been submitted successfully.");
Application.ActiveWindow.Close();
}
}