[eluser]husni[/eluser]
[quote author="theprodigy" date="1267406031"]you put your javascript code as you normally would, in an external javascript file.
The file would then be put where you would normally put it (something like public_html/javascript/file.js)
Then you would call your javascript file the same way, but you put the call in whatever view you use for your header or template.
header.php (view)
Code:
<html>
<head>
<title><?php echo $title; ?></title>
<script src="/javascript/file.js" type="text/javascript"></script> //This is the call to your javascript file
</head>
<body>
[/quote]
this is my file.js code
Code:
function peringatan()
{
alert('Hello hehe');
}// JavaScript Document
it doesn't work at all..
maybe my .js code is wrong and the directory of my javascript file is wrong..