CodeIgniter Forums
Prototype and Scriptacolous in CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Prototype and Scriptacolous in CodeIgniter (/thread-26300.html)



Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]napz[/eluser]
Have you seen any good tutorials for Prototype and Scriptacolous in CodeIgniter?


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]kgill[/eluser]
You don't need any, just use your javascript in your views like you would any normal html document. When it comes to URL's it's the same concept as if CI wasn't there except your sending stuff to mysite/controller/method instead of mysite/somepage.php, if you can use it on a normal page it should work the same in CI with the exception that you can't pass values via GET.


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]Sean Gates[/eluser]
Just throwing out my personal opinion: It doesn't matter what JS library you use with CodeIgniter. Therefore, I haven't seen any Prototype-specific tutorials that relate directly to CI.

I personally choose jQuery, but Prototype has some good things, too.

-- Sean


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]napz[/eluser]
hmmm..... thanks kgill...

so where should i put the prototype.js and scriptacolous.js? in what folder? and how should i call it in my page?
< script type="text/javascript" src="/javascript/prototype.js" >


Thanks in advance... Big Grin


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]Sean Gates[/eluser]
This is how I generally setup CI (someone else wrote this, though):

http://jrtashjian.com/blog/setting-up-codeigniter/

-- Sean

Update: Actually, this tutorial is much better: http://ifonlyiknewthat.com/codeigniter/setting-up-codeigniter/


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]napz[/eluser]
Wow.... I have check the blog and its cool.....

THanks Guys.... I'll be posting more fore some of my CI NOOB question...

hahahha...


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-10-2010

[eluser]napz[/eluser]
okay I created a jslibrary folder on the root of CI folder for the protoype.js, how can I call it from my view?


Prototype and Scriptacolous in CodeIgniter - El Forum - 01-11-2010

[eluser]napz[/eluser]
hahahah... I got it..... load the url helper... and echo the base_url()