Welcome Guest, Not a member yet? Register   Sign In
Get jQuery's Thickbox iFrame/div to work in CodeIgniter?
#1

[eluser]littlejim84[/eluser]
Hello!

I have a question. I use jQuery for my freelance projects and get it to work well enough with CodeIgniter. Thing is, I'm really wanting to use the jQuery Thickbox iframe/div functionality, but because it's based on ?var=value&var2=value2 or #var1&cece=1&car=car (for example) it doesn't seem to play to nice with CodeIgniter.

http://jquery.com/demo/thickbox/

Has anyone got any tips or do they know how to implement this correctly in CodeIgniter?

Thank you for any help at all!
#2

[eluser]Jay Turley[/eluser]
[quote author="littlejim84" date="1221699467"]Hello!
I'm really wanting to use the jQuery Thickbox iframe/div functionality

Has anyone got any tips or do they know how to implement this correctly in CodeIgniter?
[/quote]

I rejected Thickbox for the reason you mention, the use of the request string.

I found jQModal to be an adequate replacement

http://dev.iceburg.net/jquery/jqModal/

Perhaps it will work for your needs too.
#3

[eluser]Sarfaraz Momin[/eluser]
well you can have the following settings in config.php to make thickbox work for u

Code:
$config['uri_protocol']    = "REQUEST_URI";
$config['permitted_uri_chars'] = '?=&a-z 0-9~%.:_-';

have a good day !!!
#4

[eluser]jrlooney[/eluser]
I've been using thickbox in iframe mode with no troubles. Just be sure to NOT use this variable:
Code:
KeepThis=true

When jQuery/thickbox is done with the url, it strips out it's parameters if you leave that variable off the url.
#5

[eluser]littlejim84[/eluser]
Cheers for replies! Look forward to trying these out this weekend.

So really - just keep that variable off? That's it? (can't try it right now, so reason asking and not just experimenting)
#6

[eluser]blasto333[/eluser]
I modified thickbox version 3.1 to work with Codeigniter out of the box. Instead of passing the parameters such as width and height using the query string, you can simply append them to the url using the following format. Download the attached files to try it out.

Code:
echo anchor("customers/view/width:400/height:400/modal:true","View Customers",array('class'=>'thickbox'));
//<a href="http://www.somesite.com/index.php/customers/view/width:400/height:400/modal:true" class="thickbox">View Customers</a>
#7

[eluser]littlejim84[/eluser]
[quote author="jrlooney" date="1221851763"]I've been using thickbox in iframe mode with no troubles. Just be sure to NOT use this variable:
Code:
KeepThis=true

When jQuery/thickbox is done with the url, it strips out it's parameters if you leave that variable off the url.[/quote]

Cheers mate! Just what I needed!
#8

[eluser]ppardo[/eluser]
[quote author="blasto333" date="1224188282"]I modified thickbox version 3.1 to work with Codeigniter out of the box. Instead of passing the parameters such as width and height using the query string, you can simply append them to the url using the following format. Download the attached files to try it out.

Code:
echo anchor("customers/view/width:400/height:400/modal:true","View Customers",array('class'=>'thickbox'));
//<a href="http://www.somesite.com/index.php/customers/view/width:400/height:400/modal:true" class="thickbox">View Customers</a>
[/quote]

I've tried your solution, but i cannot get the box open, whenever I click the thickbox link I get the controller/view result instead of the popup box with the controller/view result inside.

At least is much than the simple thickbox.js which i couldn't make it work at all.

Do you have any idea of what could be happening?

Thanks in advance.




Theme © iAndrew 2016 - Forum software by © MyBB