javascript - iframe: Redirect to externel url -


i working on website in yii. situation this. in website, users provided piece of code this:

<iframe height="700" allowtransparency="true" frameborder="0" scrolling="no" style="width:100%;border:none" src="http://djoneclick.com/index.php?r=webservice/form&id=6b720ff1c3cdce6c278e784a3228fd9fadc6d864" title="" > <a href="/index.php?r=webservice/form&id=6b720ff1c3cdce6c278e784a3228fd9fadc6d864" title="">  </a> </iframe> 

user can embed anywhere want , take inquiries desired audience. iframe includes src form submits controller in yii. in controller, upon having specif if condition true, redirects externel url. redirects contents of url (to redirected) displayed in iframe. want redirect url. have spent hours upon r&d not find solution. help?

try after condition true in controller:

echo "<script>"; echo "this.parent.location.href = '$externel_url'"; echo "</script>"; 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -