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.");";
            }
        }
    }