Dynamic iframe pages
Permalink
I've tried making a page that can load other web pages in an iframe, dynamically through the URL. Sounds simple enough using $_REQUEST['url'] in an iframe in a custom external form, but it isn't working. Here's what I've done...
The external form file:
The URL passed to that page:
http://kzsc.org/index.php?cID=76&url=anything...
But yet the page only shows this in the code:
<iframe src="" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>
Any thoughts on how to make this actually work?
Thanks!
The external form file:
The URL passed to that page:
http://kzsc.org/index.php?cID=76&url=anything...
But yet the page only shows this in the code:
<iframe src="" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>
Any thoughts on how to make this actually work?
Thanks!
Got it working. Topic closed.
you could use thishttp://www.concrete5.org/community/features/iframe_block...
Hi razorfrog,
Would you please tell me how did you manage to make it happen?
I'd love to make it works for me as well...excuse my limited php knowledge...
Would you please tell me how did you manage to make it happen?
I'd love to make it works for me as well...excuse my limited php knowledge...
I put this in an external form block:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
if (isset($response)) { ?>
<?php echo $response?>
<?php } ?>
<iframe src="<?php
echo $_REQUEST['url'];
?>" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
if (isset($response)) { ?>
<?php echo $response?>
<?php } ?>
<iframe src="<?php
echo $_REQUEST['url'];
?>" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>
Thanks razorfrog for the quick response...
I used the code you've provided and as soon as I used it, I got the below error:
Fatal error: Call to a member function runTask() on a non-object in /home/content/85/6270085/html/c5/concrete/blocks/external_form/controller.php on line 67
And I'm not able to view the page where I added this code anymore..
I used the code you've provided and as soon as I used it, I got the below error:
Fatal error: Call to a member function runTask() on a non-object in /home/content/85/6270085/html/c5/concrete/blocks/external_form/controller.php on line 67
And I'm not able to view the page where I added this code anymore..
You might be better off installing a PHP code block like this:
http://www.concrete5.org/community/forums/block_requests/simple_php...
http://www.concrete5.org/community/forums/block_requests/simple_php...