I’m almost a WordPress geek by now, but I confess I always had trouble including a Javascript file with my own custom scripts in it. And I always used ‘wp_register_script’ and ‘wp_enqueue_script’ the wrong way. What’s worse, I literally echoed out the path to the Javascript file by assigning it to a variable first. See how I did it:
<?php
//blah blah code code....
.
.
.
//This is where I want to use my Javascript file
$pluginurl = dirname(plugin_basename(__FILE__)).'/';
$helperscripts = WP_PLUGIN_URL.'/'.$pluginurl.'js/scripts.js';
echo "<script src='".$jquery."' type='text/javascript' charset='utf-8'></script>
<script src='".$helperscripts."' type='text/javascript' charset='utf-8'></script>";
?>