Created
March 19, 2015 13:13
-
-
Save fidelix/0e380ee444963382a631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_ajaxcallback($type = 'ajax') { | |
if($type == 'ajax') { | |
$output = t('Hello World!'); | |
$command = array(); | |
$commands[] = ajax_command_append('#sayinghello', $output); | |
$page = array('#type' => 'ajax', '#commands' => $commands); --> In this line | |
ajax_deliver($page); | |
} | |
else{ | |
return t("Hello world in new page."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment