====== addScriptDeclaration ======
{#JAPI Joomla.Framework Document JDocument::addScriptDeclaration #}
Adds a script into the head block of the current page.
===== Syntax =====
void addScriptDeclaration ( **$content**, **$type** )
| **$content** | string | is a string containing the script that is to be added to the page. |
| **$type** | string | is a string containing the mime-type of the script. This parameter is optional and if omitted defaults to 'text/javascript'. |
===== Examples =====
This example adds a short script to the page.
global $mainframe;
$script = "alert( 'A script has been added to the page!' );";
$document = &JFactory::getDocument();
$document->addScriptDeclaration( $script );
Might add the following to the head of the document: