Welcome Guest, Not a member yet? Register   Sign In
Creating a popup window from within a Controller
#3

[eluser]Twisted1919[/eluser]
The approach is wrong, way too wrong.

In your controller, set a variable, something like $agree=false; by default, if the user agrees your terms, set it to true.

Then in your view, do a check, something like
<?php if(!$agree):?>
show_popup();
<?php endif;?>

where show_popup(); is a javascript function that shows the popup in the browser .
Of course, instead of a javascript function you can push it in jquery's document ready function, but the idea is that, YOU DON'T DO IT IN YOUR CONTROLLER.


Messages In This Thread
Creating a popup window from within a Controller - by El Forum - 01-31-2011, 07:12 AM
Creating a popup window from within a Controller - by El Forum - 01-31-2011, 07:44 AM
Creating a popup window from within a Controller - by El Forum - 01-31-2011, 09:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB