Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter with Thickbox
#1

[eluser]Unknown[/eluser]
Hi guys i newbie using CI, and I have a question about the jQuery thickbox plugin.

I am trying to combine href link with thickbox, and I haved trouble in here.


Code:
<a id="example" class="thickbox" href="&lt;?= site_url('example/');?&gt;">example</a>
and for thickbox function it must add : ?keepThis=true&TB_iframe=true&height=250&width=400 in behind the href link, and cause of this I get error message : 404 Page Not Found.

my question :

1. What I must doing to fix this error ? please describe step by step about the solution
until fix it.

Please help me, It would be a great contribution
#2

[eluser]Phil Sturgeon[/eluser]
If you put the query string into the site_url() function then CI will try to parse it as URL segments, which will fail.

Try the link like this:

Code:
<a id="example" class="thickbox" href="&lt;?= site_url('example');?&gt;?keepThis=true&amp;TB_iframe=true&amp;height=250&amp;width=400">example</a>
#3

[eluser]xwero[/eluser]
This will still give an error because the only thing you did is put the query string outside the site_url function. The url isn't changed.

set enable_query_string to TRUE and uri_protocol to PATH_INFO this gives you the possibility to add query_strings and still get the page.

IMO adding javascript component metadata to an url is not a good way to go but that means you have to find another lightbox plugin.
#4

[eluser]sikkle[/eluser]
xwero, any suggestion ?

thanks!
#5

[eluser]xwero[/eluser]
The lightbox plugin i use is jqModal because it is light but it has no features like getting a gallery based on links or modal animation. Just check Plugins: Windows and Overlays on the jquery site for a plugin you like the best.
#6

[eluser]sikkle[/eluser]
xwero : still efficient you are Smile

see ya around




Theme © iAndrew 2016 - Forum software by © MyBB