Skip to content Skip to sidebar Skip to footer

Automatically Close Current Window And Open New Window With New Url Address

I was using following code for auto close current window and open new window with the new URL in the variable. There is something wrong with the code, not working anymore it is clo

Solution 1:

you do know that http://www.myweb.com/weather_control.php is dead page, right? Try to use this:

<!DOCTYPE HTMLPUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"><html><head><metahttp-equiv="prahma"content="no-cache"><title>Auto Close and Open New window</title><metahttp-equiv="Content-Type"content="text/html; charset=iso-8859-1"><scriptlanguage="javascript">var url = "http://www.myweb.com/weather_control.php?"+Math.random()
  window.open(url,"","MyTitle");
  window.open('', '_self', ''); 
</script></head><bodyonload="setTimeout(function(){window.close();},2000)"></body></html>

Solution 2:

Try this

<html><head><script>functiongio() {
        popup = window.open('http://www.wholewordz.cf/2017/02/kenya-says-it-will-shut-worlds-biggest.html');
        setTimeout( 5000);
      }
    
      functionclosed(){
        setTimeout("window.close()", 500);
      }
    
      functioncall() {
        popup = window.open('http://www.google.co.in');
        setTimeout(wait, 8000);
      }
    
      functioncaller() {
        setInterval(call, 12000);
      }
    
      functionwait() {
        popup.close();
        closed();
      }
    </script></head><bodyonload="caller(); gio();"></body></html>

Post a Comment for "Automatically Close Current Window And Open New Window With New Url Address"