Welcome Guest, Not a member yet? Register   Sign In
help, how can i retrieve a cookie value in a javascript file? im using mootols and i have an issue
#16

[eluser]nardberg[/eluser]
You will not be able to affect the contents of a javascript file directly from ci. You could move the chunk of javascript, that opens and selects the slider, into a javascript in your view file, and put a php variable in the place where the current section is defined (as walesmd suggested above). You then set that variable within your php code and switch it out into the javascript when rendering the view.

<script>
...
var openSectionVar = <?={cursection}?>
...
</script>

Hope that makes sense, I only started playing with ci yesterday, seems to be a great framework.


Messages In This Thread
help, how can i retrieve a cookie value in a javascript file? im using mootols and i have an issue - by El Forum - 08-15-2007, 09:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB