abhi - Tuesday, October 6, 2015 6:49 AM:
Hello All
I have created form in aras.
Form comprises of two input textboxes and a button. User will be entering "Part Id" and "Part Revision" and will click on send button. The button on click will call javascript which inturn will call server method written in C# and create batch file with "Part Id" and "Part Revision" entry.
Form loads via the below javascript through an action -
var q = new Item("Form", "get");
q.setAttribute("select", "id, width, height");
q.setProperty("name", "Run Batch File Form");
var r = q.apply();
if (r.isError() || r.getItemCount() < 1 )
{
top.aras.AlertError("Form not found.");
return false;
}
// Get Width and Height
var height = r.getProperty("height", "700");
var width = r.getProperty("width", "800");
var param = new Object();
param.title = "Run Batch File";
param.formId = r.getItemByIndex(0).getID(); // the id of the Form to be used
//alert(param.formId);
param.item = this;
param.aras = top.aras; // the aras object
param.isEditMode=true;
var res = showModalDialog("ShowFormAsADialog.html", param,
"dialogHeight:" + height + "px; dialogWidth:" + width + "px; " +
"status:0; help:0; resizable:1; scroll:0;");
return res;
The above javascript is called on onload event of the form
Problem -1 -- Form is getting loaded but not properly as firefox is blocking popups. Not sure why popup is happening. Is there a problem in javascript ?