redirect

S

sentinel

I am using this code to redirect to another page


<body>
<script language="javascript">
window.location="index2.php?ui=0&ua=0&opt=forum"
</script>
</body>


the problem is that in one place this code is inside a floating frame
<iframe src="processing.page.php"></iframe>

the script does some stuff and if successful it redirects to index2.php


and everything works but i want it to redirect out of frame in the same
window.


how can i direct it out of frame?


thanks
 
P

Peter

I am using this code to redirect to another page

<script language="javascript">

Drop the language. It is of no use and deprecated. Use type:
window.location="index2.php?ui=0&ua=0&opt=forum"

the problem is that in one place this code is inside a floating frame
and everything works but i want it to redirect out of frame in the same
window.

You mean
parent.location = ...
or even
top.location = ...

hth
Ivo
 
A

alu

sentinel said:
I am using this code to redirect to another page


<body>
<script language="javascript">
window.location="index2.php?ui=0&ua=0&opt=forum"
</script>
</body>


the problem is that in one place this code is inside a floating frame
<iframe src="processing.page.php"></iframe>

the script does some stuff and if successful it redirects to index2.php


and everything works but i want it to redirect out of frame in the same
window.


how can i direct it out of frame?


thanks
 
J

Jedi Fans

sentinel said:
I am using this code to redirect to another page


<body>
<script language="javascript">
window.location="index2.php?ui=0&ua=0&opt=forum"
</script>
</body>


the problem is that in one place this code is inside a floating frame
<iframe src="processing.page.php"></iframe>

the script does some stuff and if successful it redirects to index2.php


and everything works but i want it to redirect out of frame in the same
window.


how can i direct it out of frame?


thanks
top.location="index2.php?ui=0&ua=0&opt=forum"
 
A

alu

Jedi Fans said:
top.location="index2.php?ui=0&ua=0&opt=forum"

'top' may not be the parent of the iframe.
just curious - why choose this over parent.location?
-alu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top