Greybox in CodeIgniter

Friday, November 7, 2008

Having a trouble using GreyBox in CodeIgniter ?
Yesterday,when i was studying CodeIgniter and intend to implement Greybox in it, i came up on that.
My greybox won't show up and just showing the linked page,no animation whatsoever.
i've been going through the installation documentation myself.

How could it be?,i thought i've made some typo, so i tried to just copy and pasted
the example code from GreyBox documentation,but it still won't work .

Later on,i launch my Chrome, and have it to inspect my code, a red sign came up.
apparently somehow, the GB_ROOT_DIR variable can't be read by Greybox's javascript ,so what i do is deleted this code from my header template


<script type="text/javascript">
var GB_ROOT_DIR ="http://localhost/assets/js/greybox/"
</script>


and then added a GB_ROOT_DIR with the link to my greybox folder to gb_scripts.js
which located inside the greybox folder like this

var GB_ROOT_DIR_="http://localhost/assets/js/greybox/";

and it worked like a charm, i'm using that solution till now
so that was my way of using Greybox in Codeigniter
if you do have another solution,share it with us ;)

2 comments:

Unknown said...

Rencanane aku arep nulis tentang Greybox in CodeIgniter. Malah wis didhisiki...

Visit my blog:weeladalah.blogspot.com

Icang said...

hew,hew
speed is everything :D

  © Blogger template Newspaper by Ourblogtemplates.com 2008

Back to TOP