Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7727777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:32:51+00:00 2026-06-01T05:32:51+00:00

tl,dr:How can I rotate between two different pages in my DIV? Hi, I am

  • 0

tl,dr:How can I rotate between two different pages in my DIV?

Hi, I am currently using the following code (Thank your internets!) to refresh PageThatGetsRefreshed.asp in a DIV on my page. All of this works famously.

<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js">
    </script>
    <script>
            $.ajaxSetup ({ cache: false });
            var auto_refresh = setInterval(
            function()
            {
            $('#container').load('PagethatGetsRefreshed.asp')}, 10000);
</script>
</head>
<body>
    <div id="container">
        <font size="4" face="arial" color="grey"> <i>Page </i></font>
    </div>
</body>

What I would like to do now is to rotate between two different pages in that DIV. IE,. page1.asp shows for 10 seconds and then changes to page2.asp for 10 seconds then back to page1.asp.

Pretty new to jquery here so I can’t for the life of me figure out how I should accomplish this. I believe I should be writing to a global variable somewhere to indicate which page is currently loaded then use IF/Else to load the other page and change the variable but I cant get this to work, Grrrr.

Also, can someone tell me does the script here continue to run so that the var auto_refresh always remains active or is it lost and reinitiated each time the scripts runs?

Thanks Everybody
KG

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:32:52+00:00Added an answer on June 1, 2026 at 5:32 am
    var frs = true;
    $.ajaxSetup ({ cache: false });
    
    var auto_refresh = setInterval(function(){
        var pg = (frs)?"page1.asp":"page2.asp"; // if(frs==true){pg = page1.asp}else{...
        frs = !frs ; // negation of frs
        $('#container').load(pg)}, 10000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have following code for moving 4 picture around circular way,but it can rotate
I have set up the following animation to rotate between views of different sizes.
I'm looking to perform split testing between 3 different pages. I'm using a uber
I'm having trouble roating an image around itself using Canvas. Since you can't rotate
How can I calculate the minimum distance between two rectangles? It is easy for
How can I find the Angle of a line between two points in actionscript
Im using the formula to calculate the distance between two points in order to
I am trying to change my Sprite anchor point so that I can rotate
I have a problem with rotating. I know that I can rotate a Texture2D
How can I rotate the text within an HSSFCell class of Apache POI?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.