Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How to make a redirect to main page of the site from the frame?
Old 02-14-2011, 12:27 AM How to make a redirect to main page of the site from the frame?
Banned

Posts: 8
Name: Divya Anderson
Trades: 0
Hello Everyone!

I can't use header in application as I have to change lots of things if I do that , Because before it the data in that frame changing, so for this reason I decided to create javascript: (Toggle Plain Text)
PHP Code:
 if ($diff>30) { 
               include(
"del.php"); 
                            echo 
"<script type='text/javascript'>
                      top.location.href = 'index.php'; </script>"
;} 
but I having one critical problem as It works only on my local server not in main server, when I put it in real server it's open that main page in the same frame!? SO can anyone expert short out my trouble or provide a suggestion that why It happened so? What should I do to avoid troubles.

Last edited by chrishirst; 02-14-2011 at 03:33 AM..
divya101101 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-14-2011, 03:27 AM Re: How to make a redirect to main page of the site from the frame?
Novice Talker

Posts: 6
Trades: 0
with the little general knowledge provide an what little java i do know this should be along the lines of what your looking for

Example:

1000 = 1 second
3000 = 3 seconds
5000 = 5 seconds

Place this code between the <head> and </head> tags

<script language="JavaScript">
<!--Script courtesy of http://www.masterpimpz.com Home of the Master Pimpz, MMORPG
var time = null
function move() {
window.location = 'name of file to redirect to here'
}
//-->
</script>

Place this code in your <body> tag
<body onload="timer=setTimeout('move()',2000)">
HipB is offline
Reply With Quote
View Public Profile
 
Old 02-14-2011, 03:40 AM Re: How to make a redirect to main page of the site from the frame?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
is this in a frame or an iframe?

Oh and, use code delimters please. Also, if you are going to copy and paste from other forums edit out the duplicated text!!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-14-2011, 03:50 AM Re: How to make a redirect to main page of the site from the frame?
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by chrishirst View Post
is this in a frame or an iframe?

Oh and, use code delimters please. Also, if you are going to copy and paste from other forums edit out the duplicated text!!
if your talkin bout me copy an paste from other forums srry but i do my own original work an am the current owner of Masterpimpz.com
HipB is offline
Reply With Quote
View Public Profile
 
Old 02-14-2011, 03:57 AM Re: How to make a redirect to main page of the site from the frame?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Might just delete that link as a self promo in that case

But no, it was the OP who copy and pasted from http://www.programmingforums.org/thread34271.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-14-2011, 04:09 AM Re: How to make a redirect to main page of the site from the frame?
Novice Talker

Posts: 6
Trades: 0
ah i see
HipB is offline
Reply With Quote
View Public Profile
 
Old 02-14-2011, 03:20 PM Re: How to make a redirect to main page of the site from the frame?
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
HipB - not a solution (look up top.location.href to see what he's getting at). As Chris says, frame or iframe? Is index.php in the same directory as the calling area?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to How to make a redirect to main page of the site from the frame?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24927 seconds with 12 queries