title: Javascript : Redirecting to another webpage through a popup
body: <p>I'm quite bad with Javascript and I can't work out a solution I need help to. I'm having a website and I'm trying to make a redirection to another site, but through a popup. </p>
  
  <p>Example : </p>
  
  <pre><code>&lt;script&gt;alert(This will prompt up the message)&lt;/scrip&gt;
  
  &lt;script&gt;window.location="http://This-will-redirect-me-to-another-link.com";&lt;/scrip&gt;
  </code></pre>
  
  <p>Like you can see I could simply use the second javascript to redirect the persons to another page, but due some reasons I can't use it as it will work only for half of the page(the script would be kinda 'sandboxed'), but if I'd make a popup(the first alert script) the second script would get out of the 'sandbox'. Is there anyone who has any ideas how I should implement this or can it be done otherwise with PHP or HTML? </p>
  
  <hr>
  
  <p>Thanks for both of your replies yet these doesn't help me out yet although I'm quite sure that your help will. I'm having a MyBB forum and there's a shoutbox for it which I'm using. There's a command which will change the notice of the shoutbox and the command is as such /notice New notice  | But I noted that the new notice can be changed with javascript and it'll work such as /notice js code here | Then I thought that what if I would make such a javascript that would redirect people to another webpage. As I'm having such a forum where it's needed to redirect from the main page to another one, I'd like to apply it. Then Staffs could do it in the forum very well, but there's a problem. by adding </p>
  
  <p>/notice window.location="http://This-will-redirect-me-to-another-link.com";
  It'll affect only the shoutbox and shoutbox is being redirected to another webpage, but as an alert works for the whole forum I thought maybe I can redirect them to somewhere else with the alert. I want to know is it possible with just one script then Staffs would be able to do it. I know it's a serious security risk &amp; it can be otherwise also, but I'd really like to experiment with it. </p>
  
  <p>I hope someone can help. :)</p>