JHtml::script
Write a <script></script> element
Signature
public function script(string
$file,
[boolean
$framework = false,
[boolean
$relative = false,
[boolean
$path_only = false,
[boolean
$detect_browser = true,
[boolean
$detect_debug = true]]]]] )
Parameters
-
$file
- path to file.
-
$framework
- load the JS framework.
-
$relative
- path to file is relative to /media folder.
-
$path_only
- return the path to the file only.
-
$detect_browser
- detect browser to include specific browser js files.
-
$detect_debug
- detect debug to search for compressed files if debug is on.
Returns
- mixed
- nothing if $path_only is false, null, path or array of path if specific js browser files were detected.