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 3663276
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:30:42+00:00 2026-05-19T01:30:42+00:00

My boss has asked for a page that will not change to have two

  • 0

My boss has asked for a page that will not change to have two timed pop ups load. I have found code and edited it to what I had thought it should do, but it is only loading the last onLoad event. I am a designer and I have helped with making webpages, but Javascript is so far outside of what I can understand. I have already learned how to use the single pop up and spent a whiiile learning the timeouts, but I cannot seem to get it to work with multiple popup functions. If you have a moment, would you take a look? Thank you 🙂

h

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>H's Page 1</title>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Ronnie T. Moore, Editor -->
<!-- Web Site:  The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
closetime = 3; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start1(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup1() {
    url = "http://www.google.com";
    width = 1680;  // width of window in pixels
    height = 1050; // height of window in pixels
    delay = 10;    // time in seconds before popup opens
    timer = setTimeout("Start1(url, width, height)", delay*1000);
    }   

closetime = 3; // Close window after __ number of seconds?


function Start2(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}


function doPopup2() {
    url = "http://www.yahoo.com";
    width = 1680;  // width of window in pixels
    height = 1050; // height of window in pixels
    delay = 5;    // time in seconds before popup opens
    timer = setTimeout("Start2(url, width, height)", delay*1000);
    }



//  End -->
</script>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<!-- Script Size:  1.27 KB -->

</head>

<body OnLoad="doPopup1(); doPopup2();">
<p>My page text.</p>
<p>My page text.</p>
<p>My page text.</p>
<p>My page text.</p>
</body>
</html>
  • 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-05-19T01:30:43+00:00Added an answer on May 19, 2026 at 1:30 am

    first, let me give my condolences to you for having a boss who orders you to use popups… they’re hateful 🙁 anyways, if you wanna scare of visitors, i guess that’s up to you. so here goes:

    you’re overwriting the url variables with your timeouts. the following works for me in firefox though:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title>H's Page 1</title>
    
            <SCRIPT LANGUAGE="JavaScript">
                <!-- Original:  Ronnie T. Moore, Editor -->
                <!-- Web Site:  The JavaScript Source -->
    
                <!-- This script and many more are available free online at -->
                <!-- The JavaScript Source!! http://javascript.internet.com -->
    
                <!-- Begin
                closetime = 3; // Close window after __ number of seconds?
                // 0 = do not close, anything else = number of seconds
    
                function Start1(URL1, WIDTH, HEIGHT) {
                    windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
                    preview = window.open(URL1, "preview", windowprops);
                    if (closetime) {
                        setTimeout("preview.close();", closetime*1000);
                    }
                }
    
                function doPopup1() {
                    url1 = "http://www.google.com";
                    width = 1680;  // width of window in pixels
                    height = 1050; // height of window in pixels
                    delay = 5;    // time in seconds before popup opens
                    timer = setTimeout("Start1(url1, width, height)", delay*1000);
                }   
    
                function Start2(URL2, WIDTH, HEIGHT) {
                    windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
                    preview = window.open(URL2, "preview", windowprops);
                    if (closetime) {
                        setTimeout("preview.close();", closetime*1000);
                    }
                }
    
                function doPopup2() {
                    url2 = "http://www.yahoo.com";
                    width = 1680;  // width of window in pixels
                    height = 1050; // height of window in pixels
                    delay = 10;    // time in seconds before popup opens
                    timer = setTimeout("Start2(url2, width, height)", delay*1000);
                }
    
                //  End -->
            </script>
    
            <!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->
    
            <!-- Script Size:  1.27 KB -->
    
        </head>
    
        <body OnLoad="doPopup1(); doPopup2();">
            <p>My page text.</p>
            <p>My page text.</p>
            <p>My page text.</p>
            <p>My page text.</p>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My boss has asked me to look into this question but I'm not sure
My boss has a windows application that he wrote. It is not a Windows
My boss has given me an assignment that I'm not sure is possible since
My boss has asked me to do something with Google results. Basically, I have
I'm working on my first real WinForms application, and my boss has asked that
I am a computer science student currently doing an internship. My boss has asked
My boss is asking me to code a report that has the following components:
My boss has asked me to write a CMS for a web-application. A place
My boss has big dreams. He wants to write an application that runs on
This is a security question. My boss has asked me to find (and show

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.