Good all the time of the day gentlemen

<script language="JavaScript" type="text/javascript"> location="page.php" </script> 

We have the usual script, which immediately jumps on the desired link. It is unnecessary to load somewhere in the body / meta, and other code.

Is it possible to make it so that if this script works inside an iframe, then the necessary page will open not inside the frame, but in the main window

    1 answer 1

    Maybe so?

     top.location.href = "http://www.ya.ru" 
    • @AlexWindHope, sorry, I took the acceptance. Yet there is a way - sergey
    • @mixalef - though I didn’t understand the question correctly, therefore - no problem, but comrade @lampa raised the mood, let the person be happy - Zowie
    • @AlexWindHope tovarisch lamp very much likes to rejoice at your failures, which you should write off non-professionalism, rather than misunderstanding the question :-) - lampa
    • @lampa there are such wise words - do not judge and you will be convicted, think about it - Zowie
    • one
      @AlexWindHope Yes, I'm just vindictive as you are :-) And leave your axioms with you. And you have no heart, and no soul, and no dispute. And balance is your ineptitude and your mistakes and your carelessness, as well as "your problem is not yours, and your concern is to solve it." Also, peace and satiety are better for you than salvation for a drowning man. After all, the salvation of drowning - the work of the drowning? So why then do you sit on this forum and help people? - lampa