Hello,
I'm new to scripting and am hitting a wall. Hoping someone can point me in the right direction. I've created a form that has a plus button and minus button. If the user clicks the plus button, they'll add a row to their table. If they click the minus button, they will delete a row. I want to have a pop up appear when they attempt to delete a row that asks them if they are sure they want to delete it. I'm able to get the message box to appear, but I don't know how to control the actions of the answer they select. If they click "Yes" (they are sure they want to delete the row), I want the row to delete. If they click "No" (they don't want to delete the row), I want the user to just return to the form with no changes. I included my script for the minus button below. Can anyone help me with the rest? Thank you so much!
form1.GettingSettled.GettingSettled.Table1.Row1.Subform1.Remove::click - (JavaScript, client)
//JavaScript to add a row from a table
var
rowNum = this.parent.index + 1;
this.parent.parent.instanceManager.removeInstance(rowNum);
xfa.host.messageBox("Are you sure you want to delete this row?"
,"Deleting a Row",1,2);