anchor.diff:  };
   
   var PingBox = React.createClass({
  +  getInitialState: function() {
  +    return {
  +      buttonValue: ping.pingButton,
  +      buttonDisabled: false,
  +      resultValue: "",
  +      progressValue: ""
  +    };
  +  },
     handleSubmit: function(e) {
       e.preventDefault();
  -    if (e.target.button.value == ping.pingButton) {
  -      e.target.button.value = ping.pingingButton;
  -      pingBoxState = 1;
  -      e.target.button.value = "...";
  -      e.target.ping_result_lag_ms.value = "";
  -      e.target.ping_progress.value = "";
  +    if (this.state.buttonValue == ping.pingButton) {
         var ping_progress = "";
  +      this.setState({
  +        buttonValue: ping.pingingButton,
  +        buttonDisabled: true,
  +        resultValue: "",
  +        progressValue: ping_progress
  +      });
         Pinger.measure(
           "<%= path_to_javascript 'ping' %>",
           function(lag){
             ping_progress = ping_progress + " " + lag;
  -          $("#ping_progress").val(ping_progress);
  -        },
  +          this.setState({progressValue: ping_progress});
  +        }.bind(this),
           function(lag){
  -          $("#ping_result_lag_ms").val(lag);
             ping.result = lag;
  -          e.target.button.value = ping.postButton;
  -        }
  -      );
  -    } else if (e.target.button.value == ping.postButton) {
  +          this.setState({
  +            buttonValue: ping.postButton,
  +            buttonDisabled: false,
  +            resultValue: lag
  +          });
  +        }.bind(this)
  +      ).bind(this);
  +    } else if (this.state.buttonValue == ping.postButton) {
         $.ajax({
           url: "/ping_results",
           type: "POST",
  
positive.code:           }
          },
          success: function(data) {
            e.target.button.value = ping.pingButton;
            e.target.ping_result_lag_ms.value = "";
            e.target.ping_progress.value = "";
          },
          error: function(xhr, status, err) {
            console.error(path, status, err.toString());
          }
        });
      };
    },
  
negative.code:     ping.clientId = this.props.clientId;
      return (
        <form className="PingBox" onSubmit={this.handleSubmit}>
          <input type="submit" id="button" value={this.state.buttonValue} disabled={this.state.buttonDisabled} />
          <input type="text" placeholder="Median" id="ping_result_lag_ms" value={this.state.resultValue} readOnly />
          <input type="text" placeholder="Progress" id="ping_progress" value={this.state.progressValue} readOnly />
          msec
        </form>
      );
  