CSS: Unix-style newlines für kivitendo DHTML-Menü
[kivitendo-erp.git] / js / calculate_qty.js
1 function calculate_qty_selection_window(input_name, alu, formel, row) {
2   var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
3   var name = document.getElementsByName(input_name)[0].value;
4   if (document.getElementsByName(alu)[0].value == "1") {
5     var action = "calculate_alu";
6     var qty = document.getElementsByName("qty_" + row)[0].value;
7     var description = document.getElementsByName("description_" + row)[0].value;
8   }  else var action = "calculate_qty";
9   url = "common.pl?" +
10     "INPUT_ENCODING=UTF-8&" +
11     "action=" + action + "&" +
12     "name=" + encodeURIComponent(name) + "&" +
13     "input_name=" + encodeURIComponent(input_name) + "&" +
14     "description=" + encodeURIComponent(description) + "&" +
15     "qty=" + encodeURIComponent(qty) + "&" +
16     "row=" + encodeURIComponent(row) + "&" +
17    "formel=" + encodeURIComponent(document.getElementsByName(formel)[0].value)
18   //alert(url);
19   window.open(url, "_new_generic", parm);
20 }