protected function clientSideReady($name=null)
    {
        //If no name specified then use default $this->name
        //If not then if $name=="", understand that there is no passing object
        //Otherwise try to pass the custom name
        if ($name==null && $this->onReady!=null) {
            echo "(".$this->onReady.")(".$this->name.");";
        } else if ($this->onReady!=null) {
            if ($name=="") {
                echo "(".$this->onReady.")();";
            } else {
                echo "(".$this->onReady.")(".$name.");";
            }
        }
    }
protected function clientSideReady($name=null)
    {
        //If no name specified then use default $this->name
        //If not then if $name=="", understand that there is no passing object
        //Otherwise try to pass the custom name
        if ($name==null && $this->onReady!=null) {
            echo "(".$this->onReady.")(".$this->name.");";
        } else if ($this->onReady!=null) {
            if ($name=="") {
                echo "(".$this->onReady.")();";
            } else {
                echo "(".$this->onReady.")(".$name.");";
            }
        }
    }
protected function clientSideReady ( $ name = null ) { //If no name specified then use default $this->name //If not then if $name=="", understand that there is no passing object //Otherwise try to pass the custom name if ( $ name == null && $ this -> onReady != null ) { echo "(" . $ this -> onReady . ")(" . $ this -> name . ");" ; } else if ( $ this -> onReady != null ) { if ( $ name == "" ) { echo "(" . $ this -> onReady . ")();" ; } else { echo "(" . $ this -> onReady . ")(" . $ name . ");" ; } } }
Render javascript code to implement user's custom script
when widget is ready at client-side

@param string $name The name of widget

@return null
Render javascript code to implement user s custom script when widget is ready at client - side