====== addScript ======
{#JAPI Joomla.Framework Document JDocument::addScript #}
Adds a linked script to the page
===== Syntax =====
void addScript ( **$url**, **$type** )
| **$url** | string | is a string containing the URL to the linked script. |
| **$type** | string | is a string containg the type of script. This parameter is optional and if omitted defaults to 'text/javascript'. |
===== Examples =====
The following example adds a linked script to the header of the current document.
global $mainframe;
$document = &JFactory::getDocument();
$document->addScript( JURI::base() . 'includes/js/overlib_mini.js' );
Might add the following to the head tag: