| Current Path : /var/www/html/ajay/phpwebsite-1.8.x/javascript/confirm/ |
| Current File : /var/www/html/ajay/phpwebsite-1.8.x/javascript/confirm/readme.txt |
To use:
// Question asked by confirm box
$js_variables['QUESTION'] = 'Are you sure you want to delete this?';
// Address to go to if they the user clicks yes
$js_variables['ADDRESS'] = 'index.php?module=mymod&command=delete_it';
// What they are clicking on - text or image
$js_variables['LINK'] = 'Delete This';
// Title for confirm link
// make sure to add slashes
$js_variables['TITLE'] = 'Delete link';
// class for link
$js_variables['CLASS'] = 'confirm-link';
// If you want a button instead of a link.
//$js_variables['type'] = 'button';
$link = Layout::getJavascript('confirm', $js_variables);
----------------------------------------------------------------
Make sure to run addslashes() on your variables!