Opening and Closing automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    Opening and Closing automatically

    Hi all,
    I m new in html.
    I want some thing like when my webpage's homepage opens a page will automatically opens and after some time that page closes automatically or a new page open at the place of that page.

    like.
    i click on AboutUs link. Ad page opens. After 10secs aboutus page opens automatically.
    OR
    i click on AboutUs link. Ad page opens automatically in a new window.

    Thanx
    >> ALI <<
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    why shouldn't the page open instantly? so that the user has an instant response ... what should happen meanwhile?

    kind regards

    ps: ahh i see ... you want to open an ad-page and redirect after some time? in this case you may use the 'meta-refresh' mechanism:

    [HTML]<meta http-equiv="refresh" content="5; URL=redirect.ht ml">[/HTML]
    or a serverside refresh or a javascript solution:

    [CODE=javascript]<script type="text/javascript">
    window.setTimeo ut( function() {
    window.location .href = 'redirect.html' ;
    }, 5000);
    </script>
    [/CODE]

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      Originally posted by gits
      why shouldn't the page open instantly? so that the user has an instant response ... what should happen meanwhile?

      kind regards

      ps: ahh i see ... you want to open an ad-page and redirect after some time? in this case you may use the 'meta-refresh' mechanism:

      [HTML]<meta http-equiv="refresh" content="5; URL=redirect.ht ml">[/HTML]
      or a serverside refresh or a javascript solution:

      [CODE=javascript]<script type="text/javascript">
      window.setTimeo ut( function() {
      window.location .href = 'redirect.html' ;
      }, 5000);
      </script>
      [/CODE]
      I like this ideal...
      nomad

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        there is no window opened ... a popup-blocker will block such a simple redirect?

        Comment

        • Ali Rizwan
          Banned
          Contributor
          • Aug 2007
          • 931

          #5
          I m sorry gits but i dont know where to place this all code, as i say i m new in html so i dont know much about html and java script, so please help me a lot.

          Thanx
          >> AIi <<

          Comment

          • nomad
            Recognized Expert Contributor
            • Mar 2007
            • 664

            #6
            Originally posted by Ali Rizwan
            I m sorry gits but i dont know where to place this all code, as i say i m new in html so i dont know much about html and java script, so please help me a lot.

            Thanx
            >> AIi <<
            You need to stick this before the [HTML]<body> [/HTML]
            [HTML] <head>
            <script type="text/javascript">
            window.setTimeo ut( function() {
            window.location .href = 'redirect.html' ;
            }, 5000);
            </script>
            </head>
            <body>

            [/HTML] or
            [HTML]
            <head>
            <meta http-equiv="refresh" content="5; URL=redirect.ht ml">
            </head>
            <body>
            [/HTML]

            nomad

            Comment

            Working...