OSDN Git Service

index.htmlの表示変更とその他単位などの変更
[vem/WITs.git] / JS / unused / renzset.js
1 function renzset(){
2
3                 var ajax=getAjax();
4
5  if(command == "renzset"){
6         var result = document.getElementById("detail");
7         }else {
8                 var result = document.getElementById("result");
9         }
10
11         if (ajax) {
12                  try{
13                          ajax.onreadystatechange = getData;
14                  }catch(e){
15                         result.innerHTML="Onreadystate change error.";
16                  }
17
18                  try{
19                         ajax.open("GET","//localhost:8000/cgi-bin/vemclient.rb?command="+encodeURIComponent(command)+"&x="+encodeURIComponent(absolutex),true);
20                         //document.getElementById("mid").innerHTML="absolutex="+absolutex+" absolutey="+absolutey;
21                  }catch(e){
22                         result.innerHTML = "ajax open error";
23                  }
24
25                 try {
26                          ajax.send(null);
27                 }catch (e) {
28                         result.innerHTML ="send error";
29                 }
30
31         }else {
32                 result.innerHTML = "you cannot use ajax....";
33         }
34
35         function getData() {
36                         if (ajax.readyState==4) {
37                                         if (ajax.status==200) {
38                                                          result.innerHTML = ajax.responseText;
39                                                  }else {
40                                                          result.innerHTML = "HTTP transmission....";
41                                                 }
42                          }
43         }
44  }
45
46
47
48
49 /*
50  * To change this license header, choose License Headers in Project Properties.
51  * To change this template file, choose Tools | Templates
52  * and open the template in the editor.
53  */
54
55