original_string: public function getScript()
      {
          $sJsCode = '';
          switch($this->sType)
          {
          case Jaxon::FORM_VALUES:
              $sJsCode = $this->getJsCall('getFormValues', $this->xValue);
              break;
          case Jaxon::INPUT_VALUE:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.value';
              break;
          case Jaxon::CHECKED_VALUE:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.checked';
              break;
          case Jaxon::ELEMENT_INNERHTML:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.innerHTML';
              break;
          case Jaxon::QUOTED_VALUE:
              $sJsCode = $this->getQuotedValue(addslashes($this->xValue));
              break;
          case Jaxon::BOOL_VALUE:
              $sJsCode = ($this->xValue) ? 'true' : 'false';
              break;
          case Jaxon::PAGE_NUMBER:
              $sJsCode = (string)$this->xValue;
              break;
          case Jaxon::NUMERIC_VALUE:
              $sJsCode = (string)$this->xValue;
              break;
          case Jaxon::JS_VALUE:
              if(is_array($this->xValue) || is_object($this->xValue))
              {
                  // Unable to use double quotes here because they cannot be handled on client side.
                  // So we are using simple quotes even if the Json standard recommends double quotes.
                  $sJsCode = str_replace(['"'], ["'"], json_encode($this->xValue, JSON_HEX_APOS | JSON_HEX_QUOT));
              }
              else
              {
                  $sJsCode = (string)$this->xValue;
              }
              break;
          }
          return $sJsCode;
      }
code: public function getScript()
      {
          $sJsCode = '';
          switch($this->sType)
          {
          case Jaxon::FORM_VALUES:
              $sJsCode = $this->getJsCall('getFormValues', $this->xValue);
              break;
          case Jaxon::INPUT_VALUE:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.value';
              break;
          case Jaxon::CHECKED_VALUE:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.checked';
              break;
          case Jaxon::ELEMENT_INNERHTML:
              $sJsCode = $this->getJsCall('$', $this->xValue) . '.innerHTML';
              break;
          case Jaxon::QUOTED_VALUE:
              $sJsCode = $this->getQuotedValue(addslashes($this->xValue));
              break;
          case Jaxon::BOOL_VALUE:
              $sJsCode = ($this->xValue) ? 'true' : 'false';
              break;
          case Jaxon::PAGE_NUMBER:
              $sJsCode = (string)$this->xValue;
              break;
          case Jaxon::NUMERIC_VALUE:
              $sJsCode = (string)$this->xValue;
              break;
          case Jaxon::JS_VALUE:
              if(is_array($this->xValue) || is_object($this->xValue))
              {
                  // Unable to use double quotes here because they cannot be handled on client side.
                  // So we are using simple quotes even if the Json standard recommends double quotes.
                  $sJsCode = str_replace(['"'], ["'"], json_encode($this->xValue, JSON_HEX_APOS | JSON_HEX_QUOT));
              }
              else
              {
                  $sJsCode = (string)$this->xValue;
              }
              break;
          }
          return $sJsCode;
      }
code_tokens: public function getScript ( ) { $ sJsCode = '' ; switch ( $ this -> sType ) { case Jaxon :: FORM_VALUES : $ sJsCode = $ this -> getJsCall ( 'getFormValues' , $ this -> xValue ) ; break ; case Jaxon :: INPUT_VALUE : $ sJsCode = $ this -> getJsCall ( '$' , $ this -> xValue ) . '.value' ; break ; case Jaxon :: CHECKED_VALUE : $ sJsCode = $ this -> getJsCall ( '$' , $ this -> xValue ) . '.checked' ; break ; case Jaxon :: ELEMENT_INNERHTML : $ sJsCode = $ this -> getJsCall ( '$' , $ this -> xValue ) . '.innerHTML' ; break ; case Jaxon :: QUOTED_VALUE : $ sJsCode = $ this -> getQuotedValue ( addslashes ( $ this -> xValue ) ) ; break ; case Jaxon :: BOOL_VALUE : $ sJsCode = ( $ this -> xValue ) ? 'true' : 'false' ; break ; case Jaxon :: PAGE_NUMBER : $ sJsCode = ( string ) $ this -> xValue ; break ; case Jaxon :: NUMERIC_VALUE : $ sJsCode = ( string ) $ this -> xValue ; break ; case Jaxon :: JS_VALUE : if ( is_array ( $ this -> xValue ) || is_object ( $ this -> xValue ) ) { // Unable to use double quotes here because they cannot be handled on client side. // So we are using simple quotes even if the Json standard recommends double quotes. $ sJsCode = str_replace ( [ '"' ] , [ "'" ] , json_encode ( $ this -> xValue , JSON_HEX_APOS | JSON_HEX_QUOT ) ) ; } else { $ sJsCode = ( string ) $ this -> xValue ; } break ; } return $ sJsCode ; }
docstring: Generate the javascript code.
  
  @return string
docstring_tokens: Generate the javascript code .