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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:22:24+00:00 2026-06-08T22:22:24+00:00

I made a layout and had everything set and when I implement the counter

  • 0

I made a layout and had everything set and when I implement the counter portion under my text all the other HTML elements disappear why is that? Also is there any way I can make an email alert when the counter gets to a specific time?

<!doctype html>
<html lang="en">

    <head>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-
        scalable=0, width=device-width;">
        <title>Welcome to Tiffany &amp; Co.</title>
        <link rel="stylesheet" href="index.css"
        type="text/css" media="screen" />
        <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
        <!--Enable media queries in some unsupported subrowsers-->
        <script type="text/javascript" src="css3-mediaqueries.js"></script>
        <script type="text/javascript" src="main.js"></script>
    </head>

    <body>
        <div id="wrapper">
            <h1>Welcome to Store</h1>
            <p>The WiFi Password is:</p>
            <h2 align=center>
                <font color="red">Diamonds</font>
            </h2>
            <p>It will change in:</p>
            <p>
                <script type="text/JavaScript">
                    window.document.onload = function () {
                        tick();
                        setInterval(tick, 1000);
                    };

                    function tick() {
                        var d = new Date();
                        var currentDate = new Date(d.getUTCFullYear(),
                        d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(),
                        d.getUTCMinutes(), d.getUTCSeconds(),
                        d.getUTCMilliseconds());
                        var endDate = new Date(currentDate.getFullYear(),
                        currentDate.getMonth(), currentDate.getDate() + (30
                        /* 
                                saturday */
                        - currentDate.getDay()), 16
                        /* 9 AM Mountain 
                                Time = 4 PM GMT */
                        );
                        var secondsUntilSaturday = Math.floor((endDate.getTime() - currentDate.getTime()) / 1000);
                        var timeUntilSaturday = secondsToTime(secondsUntilSaturday);
                        document.body.innerHTML = (timeUntilSaturday.h + " hours, " + timeUntilSaturday.m + " minutes, " + timeUntilSaturday.s + " 
                                seconds");
                    }

                    function secondsToTime(secs) {
                        var hours = Math.floor(secs / (60 * 60));
                        var divisor_for_minutes = secs % (60 * 60);
                        var minutes = Math.floor(divisor_for_minutes / 60);
                        var divisor_for_seconds = divisor_for_minutes % 60;
                        var seconds = Math.ceil(divisor_for_seconds);
                        var obj = {
                            "h": hours,
                            "m": minutes,
                            "s": seconds
                        };
                        return obj;
                    }
                </script>
                <div id="logo">
                    <img src="logo.png" width="108" height="14" alt="Tiffany &amp; Co." />
                </div>
        </div>
    </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-06-08T22:22:25+00:00Added an answer on June 8, 2026 at 10:22 pm

    That’s because you’re replacing whole body content with your timer

    document.body.innerHTML = (
        timeUntilSaturday.h +" hours, "+ 
        timeUntilSaturday.m +" minutes, "+ timeUntilSaturday.s +" 
        seconds"
    );
    

    Instead of this add <div> for timer and set content with your timer

    <div id="timer"></div>
    <script>
    document.getElementById('timer').innerHTML = (
            timeUntilSaturday.h +" hours, "+ 
            timeUntilSaturday.m +" minutes, "+ timeUntilSaturday.s +" 
            seconds"
        );
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a layout for my app which uses a lot of activities.
I made a camera layout where two buttons existed.A click button and a share
I have a registration form on my layout grid, made out of a stackPanel.
I made an iphone app to capture image from camera and to set that
I've made something wrong to my own git repository argh :/ Before I had
I have made custom .xml layout for ListView. Now it looks: But it isn't
I have made a ListView with an ArrayAdapter. It works. But I had to
I made 2 layout , the first one for android 2.1 ( I need
I'm trying to layout several custom views in a landscape iPad application (made landscape
onReceive is never getting call!! I had this working and I made some changes

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.