CodeIgniter Forums
Determine if JS is enabled in the controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Determine if JS is enabled in the controller (/thread-46633.html)



Determine if JS is enabled in the controller - El Forum - 11-09-2011

[eluser]Unknown[/eluser]
I am using a template system that autoloads my headers and footer.

Code:
public function index()
{
$this->template->display('about/about_view');
}

This works fine but I am loading my resume view in a fancybox iframe and I need them to not include the headers and footers.

Currrent Resume view
Code:
public function resume()
{
$this->template->display('about/resume_view');
}

Now I know I could just load a different view with no script tags including the headers and footers outside of my template, but is there any way to have the controller be notified if JavaScript is enabled?

Here is an example of what I mean...
Code:
public function resume()
{
        //If JS isn't enabled do this line
$this->template->display('about/resume_view');
        //else if it is enabled do this...
        $this->load->view('about/resume_view_has_js');
}