Welcome Guest, Not a member yet? Register   Sign In
How do I insert Javascript in CI?
#3

[eluser]EthanSP[/eluser]
[quote author="waldmeister" date="1215443884"]Basically you got two options:

1. You can add a "[removed][removed]" tag to your view and insert your js function there or
2. Put your function in a js file and include that file in your view using "[removed][removed]"
[/quote]

Waldmeister, thanks for your reply. I haven't used the [removed] tags ever. I'll try to use it now but if you got time, can I ask for a working example?

Quote:...you can create your js code in the controller and give it to the view file using the $data array)

Yes, I tried doing this once but it seems to be defeating the purpose of JS and that, as what I understand, is to prevent accessing the CGI script from the server as much as possible. That's why, I tried experimenting and researching on some other sort, w/c brought me here. And I thank you for giving a piece of what you know. So, I think, it's time to try it out.

Again, thank you.


Jong


Messages In This Thread
How do I insert Javascript in CI? - by El Forum - 07-07-2008, 03:59 AM
How do I insert Javascript in CI? - by El Forum - 07-07-2008, 04:18 AM
How do I insert Javascript in CI? - by El Forum - 07-07-2008, 07:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB