Location: PHPKode > scripts > RSPA > rspa/example/MyClass.class.php
<?php

require_once("../components/Form.class.php");

class MyClass  extends Form{

   
    function multiply() {
     
       $val = $this->controls["text1"]->getValue() * $this->controls["text2"]->getValue();
       //$this->controls["text3"]->setDisabled("true");
       $this->controls["text3"]->setStyle("background-color: #ffb;");
       $this->controls["text3"]->setValue($val);
    	
    }
    
   function setOptions(){
   		
   		$options = array("11"=>"Hello",
    					 "21"=>"Select",
    					 "31"=>"Option3"
    					);
    	$this->controls["select1"]->setOptions($options);			
    	$this->controls['select1']->addtoSelection("21");
   		$this->controls["select1"]->setDisabled("true");
   } 
    
   function functionWithParm($arg, $arg1){
    	
    	$this->controls["name2"]->setValue($arg. "  ". $arg1);	
    }
    
    function autoComplete() {
    	
	$val = $this->controls["autocomplete1"]->getValue();
    	for($i=1;$i<11;$i++){
    	
    	 $this->controls["autocomplete1"]->addChoice($val. $i,"<B>Hello<u>H R U Sunish</u></b>");	
    	}
    }
    
    function updateLabels() {
    	$this->controls["label1"]->setValue("Time on Server is" .date("l dS of F Y h:i:s A"));
    	$this->controls["label2"]->setValue($this->controls["label2"]->getValue()."<br>Append to RW Label");
    		
    }

    function executeJS() {
    	$this->clientExecute("alert('I am called from a server function');");
	$this->clientExecute("alert('Again I am called from a server function second time');");
    	
    		
    }
}

?>
Return current item: RSPA