[eluser]psdtocode[/eluser]
Hello,
I'm new to both CI and JS, however, I can't explain what is going on, and help from others isn't working. Basically, I am making a simple todo list, and I want to use JS/AJAX to get familiar with JS more. However, I'm having trouble just including JS files.
First, I was doing a relative path, such as src="prototype-1.0.6.2.js" (I've also tried jQuery), which didn't work. I then tried a couple different absolute paths, which didn't work as well. Finally, I searched on here and found a script_url helper (similar to a link_url()) helper, which doesn't work for me. Which ways are you able to include JS files (hopefully without a helper), because I can't seem to get it working.
I know it's not including because I can't use simple $() functions, and normal JS functions work (such as alert()
. In Safaris error viewer, it shows up an error when I try to use relative paths, and nothing shows up when I try to go to absolute paths. Any and all help is appreciated.
Just a note, I'm including it from a view file.
Thanks,
Andrew