b09183f7c0d0540aa12a4f4323574f4d78ce1e69
[kivitendo-erp.git] / js / customer_or_vendor_selection.js
1 function customer_or_vendor_selection_window(input_name, input_id, is_vendor, allow_both, action_on_cov_selected) {
2   var parm = centerParms(800,600) + ",width=800,height=600,status=yes,scrollbars=yes";
3   var name = document.getElementsByName(input_name)[0].value;
4   url = "common.pl?" +
5     "INPUT_ENCODING=UTF-8&" +
6     "action=cov_selection_internal&" +
7     "name=" + encodeURIComponent(name) + "&" +
8     "input_name=" + encodeURIComponent(input_name) + "&" +
9     "input_id=" + encodeURIComponent(input_id) + "&" +
10     "is_vendor=" + (is_vendor ? "1" : "0") + "&" +
11     "allow_both=" + (allow_both ? "1" : "0") + "&" +
12     "action_on_cov_selected=" + (action_on_cov_selected ? encodeURIComponent(action_on_cov_selected) : "")
13   //alert(url);
14   window.open(url, "_new_cov_selection", parm);
15 }