Changeset 13958
- Timestamp:
- 05/29/12 13:35:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.js
r13949 r13958 166 166 args += "&"+inputs[i].name+"="+inputs[i].value; 167 167 168 //alert(args); 168 var selects = document.getElementsByTagName("select"); 169 for (var i=0; i<selects.length; i++) 170 args += "&"+selects[i].name+"="+selects[i].value; 169 171 170 172 sendCommand(args); … … 558 560 cell2.setAttribute("class", valid(cols[1]) ? "tcell2" : "tcell2l"); 559 561 560 if (check.length==0 || check[0]!="input") 562 if (check.length>0 && check[0]=="select") 563 { 564 var args = check[1].split('/'); 565 566 if (args.length<2) 567 alert("Argument name missing for'"+check[1]+"'"); 568 else 569 { 570 var div = $new("div"); 571 div.innerHTML = args[0]; 572 cell1.appendChild(div); 573 574 var input = $new("SELECT"); 575 input.name = args[1]; 576 for (var j=2; j<args.length; j++) 577 input.options.add(new Option(args[j])); 578 cell2.appendChild(input); 579 } 580 581 } 582 if (check.length>0 && check[0]=="input") 583 { 584 var opt = check[1].split('/'); 585 586 if (opt.length<2) 587 alert("Argument name missing for'"+check[1]+"'"); 588 else 589 { 590 var div = $new("div"); 591 div.innerHTML = opt[0]; 592 cell1.appendChild(div); 593 594 var input = $new("input"); 595 input.name = opt[1]; 596 input.type = "text"; 597 input.maxlength = 80; 598 if (opt.length>2) 599 input.value=opt[2]; 600 601 cell2.appendChild(input); 602 } 603 } 604 if (check.length==0 || (check[0]!="input" && check[0]!="select")) 561 605 { 562 606 var div = $new("div"); 563 607 div.innerHTML = cols[1]; 564 608 cell1.appendChild(div); 565 //cell1.appendChild($txt(cols[1]));566 609 567 610 if (cols.length>2 && cols[2].length>0) 568 611 { 569 612 cell2.id = "data"+z+"-"+counter; 570 //cell2.setAttribute("data-form", cols[2]);571 613 cell2.dataFormat = cols[2]; 572 614 cell2.appendChild($txt("---")); … … 575 617 else 576 618 cell1.setAttribute("class", "description"); 577 }578 else579 {580 var opt = check[1].split('/');581 582 if (opt.length<2)583 alert("Argument name missing for'"+check[1]+"'");584 585 var div = $new("div");586 div.innerHTML = opt[0];587 cell1.appendChild(div);588 //cell1.appendChild($txt(opt[0]));589 590 var input = $new("input");591 input.name = opt[1];592 input.type = "text";593 input.maxlength = 80;594 if (opt.length>2)595 input.value=opt[2];596 597 cell2.appendChild(input);598 619 } 599 620
Note:
See TracChangeset
for help on using the changeset viewer.