1: <?php
2: /**
3: * Description of tag
4: *
5: * @author SARTAJ
6: */
7: namespace Sphp\comp{
8:
9: class Tag extends \Sphp\tools\Component{
10:
11: protected function onrender(){
12: if($this->tagName == "div"){
13: $this->HTMLName = "";
14: }
15: if($this->value!=''){
16: $this->setAttribute('value', $this->value);
17: }
18: }
19:
20: // javascript functions
21: public function getJSValue(){
22: return "document.getElementById('$this->name').value" ;
23: }
24:
25: public function setJSValue($exp){
26: return "document.getElementById('$this->name').value = $exp;" ;
27: }
28:
29:
30: }
31: }
32: