Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

i want to redirect to main page from iframe javascript

//Will redirect the top most parent Iframe.
window.top.location.href = "http://www.example.com";

//Will redirect the parent iframe.
window.parent.location.href = "http://www.example.com"; 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #redirect #main #page #iframe #javascript
ADD COMMENT
Topic
Name
8+6 =