![]() |
Frameset with CodeIgniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Frameset with CodeIgniter (/showthread.php?tid=44295) |
Frameset with CodeIgniter - El Forum - 08-10-2011 [eluser]Unknown[/eluser] I know that frames are evil, but I need to port over a tool to CodeIgniter and this tool uses frames. Firstly, I'm new to CodeIgniter so I might just be missing something very simple. What I have is a controller which calls a view called main_page. main_page.php uses the frameset tag to divide the page into two frames. I have set the src attributes of the frames to be something like: src = \"" . site_url("/controllerName/functionName1") . \"" and src = \"" . site_url("/controllerName/functionName2") . \"" functionName1 and functionName2 represent the functions in the controller that call the view files for each frame. The code for each function is something like this: function functionName() { $this->load->view('view_file_name'); } The url helper is loaded in the constructor of the controller. The page gets divided into the frames correctly, but I'm getting a 404 Not Found error for each of these frames- "The requested URL /projectName/index.php/controllerName/functionName was not found on this server". However, if I try loading the same URL (localhost/projectName/index.php/controllerName/functionName) directly, each frame shows up correctly. I thought that this might have something to do with the URL so I tried changing the src attribute to src= \"" . baseurl() . "index.php/controllerName/functionName" . "\" but this just showed me a completely blank page. Does anyone have any ideas about what I'm doing wrong? Or is it something about code igniter that will prevent me from doing something like this? Thanks! Frameset with CodeIgniter - El Forum - 08-10-2011 [eluser]Unknown[/eluser] I got it to work, but I had to manually include the entire link in the src attribute: src = http://localhost/projectName/index.php/controllerName/functionName I haven't been able to figure out how to get it to work with the url helper though. Any suggestions? |