Meta redirect to open in new window

by vjboc
9 replies
Is there a way to auto redirect a link in new window. Either meta refresh or java. What is the html ? Thanks in advance.
#meta #open #redirect #window
  • Profile picture of the author Charles Profit
    Hi ... Simple Javascript

    PHP Code:
    <script type="text/javascript">window.open('http://google.com');</script> 
    I think you may have some issue with popup blocking by most browsers.
    {{ DiscussionBoard.errors[6974155].message }}
    • Profile picture of the author vjboc
      Originally Posted by Charles Profit View Post

      Hi ... Simple Javascript

      PHP Code:
      <script type="text/javascript">window.open('http://google.com');</script> 
      I think you may have some issue with popup blocking by most browsers.
      Thanks Charles. Is there any javascript code that need to be added to make this code work?
      {{ DiscussionBoard.errors[6980979].message }}
      • Profile picture of the author Charles Profit
        Originally Posted by vjboc View Post

        Thanks Charles. Is there any javascript code that need to be added to make this code work?
        Sorry - that is the Javascript (not phpcode --- I used the wrong bbcode). It will work on an html page as well as a php page.

        But as I mentioned earlier, and as andy789 said, new browsers will block the popup.
        {{ DiscussionBoard.errors[6981766].message }}
  • Profile picture of the author andy789
    bad idea ... new browser will automatically block it.
    Signature
    >> IM Coupons <<
    {{ DiscussionBoard.errors[6981730].message }}
  • Profile picture of the author vjboc
    Is there a meta redirect that lets you redirect to more than one url?
    {{ DiscussionBoard.errors[6982709].message }}
  • Profile picture of the author gowthamgutha
    <meta http-equiv="refresh" content="0;url=NEW PAGE URL" />

    Example: <meta http-equiv="refresh" content="0;url=java-demos.blogspot.com" />
    {{ DiscussionBoard.errors[7257152].message }}
  • Profile picture of the author gowthamgutha
    In Java if using Servlets,

    response.sendRedirect("url");

    Example: response.sendRedirect("java-demos.blogspot.com");

    Don't forget the protocol
    {{ DiscussionBoard.errors[7257159].message }}
  • Profile picture of the author ashok999333
    Use the following hybrid :

    <meta http-equiv="refresh" content="5; URL=javascript:window.open('URL to redirect','_parent');">
    Signature

    A simple Blogger Wordpress Poster that can automatically extract data from any website and post it to your blog easily.
    http://www.youtube.com/watch?v=c1JI9jNY5Ps or email me at bwposter@gmail.com
    http://freesoftwa.blogspot.com/

    {{ DiscussionBoard.errors[7259368].message }}

Trending Topics