Use this one, should work as per your requirement:
var cInput = xfa.host.response("Enter number of rows you want to add:", "Add rows", "1", false),nIndex = this.parent.index,cDate = date.rawValue,n = parseInt(cInput, 10) > 0 ? parseInt(cInput, 10) : 1,i = 0;if (cInput !== null) {for (i; i < n; i += ...