1 ajax.inc | ajax_command_redirect($url) |
Provides an AJAX command to set the window.location, loading that URL.
This command is implemented by Backdrop.ajax.prototype.commands.redirect() defined in misc/ajax.js.
Parameters
string $url: The URL that will be loaded into window.location. This should be a full URL, one that has already been run through the url() function.
Return value
array: An array suitable for use with the ajax_render() function.
Related topics
File
- core/
includes/ ajax.inc, line 1473 - Functions for use with Backdrop's Ajax framework.
Code
function ajax_command_redirect($url) {
return array(
'command' => 'redirect',
'url' => $url,
);
}