Welcome Guest, Not a member yet? Register   Sign In
iframe src
#1

[eluser]obay[/eluser]
Hi all,

I'm very new to CI and hope you could help me out.

I have a view called "review_perform_view.php". Inside it, I have a

Code:
<iframe src="review/bugs"></iframe>

which is supposed to display "review_bugs_view.php". However, the "review/bugs" isn't loaded, that is, the bugs() function in my review.php controller isn't being executed. Instead, inside the iframe is the same page where the iframe is in. Therefore it is sort of an infinite loop of the page - with each iframe displaying the page that displayed it. And so on and so forth. I have to click "stop" in my browser to stop infinitely loading the page.

What am I doing wrong?
#2

[eluser]Aken[/eluser]
Sounds like an issue with your controller. Try getting it so that yourwebsite.com/review/bugs/ loads as it should if it were inside an iFrame first, and then stick it in the iFrame.
#3

[eluser]obay[/eluser]
Thanks Aken!
#4

[eluser]obay[/eluser]
I just used

Code:
<iframe src="<?= site_url(); ?>/review/bugs"></iframe>

and it works Smile




Theme © iAndrew 2016 - Forum software by © MyBB