Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-08-2009
Member
 
Join Date: Dec 2008
Posts: 51
How to redirect iframe in PHP

I have developed a personal website there I have setup an <iframe> in the body of the website. Normally, this iframe displays a PHP based page. Is it possible to put any java script that I can put into iframe.html so it will be redirecting main page? How do I redirect a website that will be displaied inside an iframe in a form?
Reply With Quote
  #2  
Old 08-08-2009
Member
 
Join Date: Jan 2009
Posts: 143
Re: How to redirect iframe in PHP

Create a user control and insert an iFrame. You may have to go to HTML tab and enter code there. The method, window.open() stops working if the IFrame's zone has not been given adequate time to be resolved, i.e. "Unknown Zone".

<iframe name="iframename" id="iframename" src="http://sitename.com" width="658" height="600" scrolling="auto" frameborder="no" bordercolor="#fffffff" marginwidth="0" marginheight="0"></iframe>
Reply With Quote
  #3  
Old 08-08-2009
Member
 
Join Date: Mar 2008
Posts: 192
Re: How to redirect iframe in PHP

Do you want the JavaScript to redirect the iframe page to the main page? use .htaccess to 301 or 302 redirect. that is the prefered way, particularly for search engines. Put the URL in the iFrame src property or in the code, type in the following: FRAME1.Attributes.Add("src", "http://localhost/myPage/myPage.aspx")
Reply With Quote
  #4  
Old 08-08-2009
Member
 
Join Date: Feb 2009
Posts: 105
Re: How to redirect iframe in PHP

Isolated the problem and believe it is a bug. The method, window.open() stops working if the IFrame's zone has not been given adequate time to be resolved, Based on his ongoing investigation, the attacks seem to be continuing unabated. I just need to redirect the Main page to whenever I need, using java script inserted into iframe.html.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to redirect iframe in PHP"
Thread Thread Starter Forum Replies Last Post
Link outside of an iframe Allison Software Development 5 07-01-2011 06:15 PM
What is Mal/Iframe-E? Hecter Networking & Security 4 04-02-2010 05:46 AM
How to use Iframe tag in javascript Walter89 Software Development 3 30-06-2009 11:39 PM
How to use iFrame? Jason Bourne Software Development 4 18-05-2009 06:13 PM
No Border In iframe QUINEISHA Software Development 2 16-05-2009 01:04 PM


All times are GMT +5.5. The time now is 12:44 AM.