1 function part_selection_window(input_partnumber, input_description, input_partsid, allow_creation, formname, options) {
2 var width = allow_creation ? 1000 : 800;
3 var parm = centerParms(width,500) + ",width=" + width + ",height=500,status=yes,scrollbars=yes";
4 var partnumber = document.getElementsByName(input_partnumber)[0].value;
5 var description = document.getElementsByName(input_description)[0].value;
6 var action_on_part_selected = document.getElementsByName("action_on_part_selected")[0];
7 var form = (formname == undefined) ? document.forms[0] : document.getElementsByName(formname)[0];
8 var filter = document.getElementsByName(input_partnumber + "_filter")[0];
9 var input_partnotes = "";
11 if (input_partnumber.match(/_\d+$/)) {
12 input_partnotes = input_partnumber;
13 input_partnotes = input_partnotes.replace(/partnumber/, "partnotes");
14 if (input_partnotes == input_partnumber)
19 filter = filter.value;
27 "action=part_selection_internal&" +
28 "partnumber=" + escape_more(partnumber) + "&" +
29 "description=" + escape_more(description) + "&" +
30 "input_partnumber=" + escape_more(input_partnumber) + "&" +
31 "input_description=" + escape_more(input_description) + "&" +
32 "input_partsid=" + escape_more(input_partsid) + "&" +
33 "input_partnotes=" + escape_more(input_partnotes) + "&" +
34 "filter=" + escape_more(filter) + "&" +
35 "options=" + escape_more(options) + "&" +
36 "formname=" + escape_more(formname) + "&" +
37 "allow_creation=" + (allow_creation ? "1" : "0") + "&" +
38 "action_on_part_selected=" + (null == action_on_part_selected ? "" : action_on_part_selected.value);
40 window.open(url, "_new_part_selection", parm);