CodeIgniter with Thickbox |
[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="<?= site_url('example/');?>">example</a> 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
[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="<?= site_url('example');?>?keepThis=true&TB_iframe=true&height=250&width=400">example</a>
[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.
[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.
|
Welcome Guest, Not a member yet? Register Sign In |