Sha256: d91518c5f25798b336839e2fcfc2301bb8e7f77fa1c04de54aeae79cee6a92a7

Contents?: true

Size: 679 Bytes

Versions: 1

Compression:

Stored size: 679 Bytes

Contents


<script>
function getPageName(elem) {
  if (document.getElementById(elem).value) {
    document.getElementById(elem).style.color = 'red;' ;
  } else {
    document.getElementById(elem).style.color = 'blue;' ;
  };
  var xmlhttp=false;
  xmlhttp = new XMLHttpRequest();
  
  xmlhttp.open("GET", "/pimki/show/HomePage", true);
  xmlhttp.onreadystatechange=function() {
    for(i=0; i< 100000;i++);
    if (xmlhttp.readyState==4) {
      document.getElementById(elem).style.color = 'green;' ;
    }
  }
  xmlhttp.send(null);
}
</script>

<input type="checkbox" id="todo" name="todo" onClick='getPageName("green");' /><span id='green'>Super green!</span>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Pimki-1.7.092 app/views/wiki/test.rhtml