JavaScript problem with the Detail Line on the 2nd Form

 0 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
shaylaw
New Member
Posts: 1
New Member
    A customed online program is written with 3 different forms.  There is a button on the first form to press to go to the 2nd form which has the detail lines.  My JavaScript is preventing all the data to be displayed on the 2nd form including the data on the detatil lines.  I'd like to get this script running when I am on the 2nd form (how do you check to see that you're on the right form?).  I would like to Change/Delete the detail line when the account # is the one we wanted to be, otherwise display a message. Any help is appreciated.  Thank you.
    Kory

    function FORM_OnAfterTransaction(FC)
    {
    if (FC == "C")
    {
    for (var i=0;i<8;i++) {
    var sUserFld = lawForm.getFormValue("select1",i);
    var sLineFC = lawForm.getFormValue("fc1",i); 
    if ((sUserFld == "511800" || sUserFld == "511805" || sUserFld == "512700" || sUserFld == "512740" || sUserFld == "511235" || sUserFld == "511905") && (sLineFC == "C" || sLineFC == "D"))
    {
    lawForm.positionInFieldById("select1",i);
    alert("Account # belongs to Basic Science Dept");
    return false;
    }
    }
    }
    }