CHips L MINI SHELL

CHips L pro

Current Path : /opt/cpanel/ea-php54/root/usr/share/doc/pear/HTML_AJAX/examples/support/
Upload File :
Current File : //opt/cpanel/ea-php54/root/usr/share/doc/pear/HTML_AJAX/examples/support/testHaa.class.php

<?php
/**
 * Require the action class
 */
require_once 'HTML/AJAX/Action.php';

class testHaa {
	function updateClassName() {
		$response = new HTML_AJAX_Action();

		$response->assignAttr('test','className','test');

		return $response;
	}

	function greenText($id) {
		$response = new HTML_AJAX_Action();
		$response->assignAttr($id,'style','color: green');
		return $response;
	}

	function highlight($id) {
		$response = new HTML_AJAX_Action();
		$response->assignAttr($id,'style','background-color: yellow');
		return $response;
	}

	function duplicate($id,$dest) {
		// there really should be an action method to do this
		$response = new HTML_AJAX_Action();
		$response->insertScript("
			var newNode = document.getElementById('$id').cloneNode(true);
			newNode.id = 'newNode';
			document.getElementById('$dest').appendChild(newNode);");
		return $response;
	}
}

Copyright 2K16 - 2K18 Indonesian Hacker Rulez