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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:26:44+00:00 2026-06-09T07:26:44+00:00

I am experimenting with JavaScript again, and wanted to make a clock in an

  • 0

I am experimenting with JavaScript again, and wanted to make a clock in an alert box (bookmarklet).

The following code:

javascript:alert(new%20Date().toLocaleString())

will show the time in the format Wednesday, August 08, 2012 12:40:54 AM. However, the time for the clock is not updated because the bookmarklet is just fetching the time. So, are alert boxes able to be updated (like this:)

javascript:alert(setInterval("new%20Date().toLocaleString()",1000))

or is an alert box not able to be updated (it fetches something and then stops executing script)?

EDIT* I have tried the second code line already and know it doesn’t work, I only mean for it to be an example of finding a method that allows the time to be updated.

  • 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-09T07:26:46+00:00Added an answer on June 9, 2026 at 7:26 am

    No – alert boxes print a string and their content cannot be changed whilst they are showing.

    Use a DHTML dialog simulation instead, such as Facebook’s. Since these are just HTML doing the job of native modal functions (e.g. alert()) they are much more flexible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am experimenting with HTML and JavaScript. The following code should print something when
I am experimenting with JavaScript Inheritance. Basically, I am following this tutorial. I see
i've started learning about javascript closures, and while experimenting, i realised that the following
I was experimenting with the new video HTML tags and I've tried to make
I'm new to Javascript/Jquery and PHP and I'm experimenting with it. Basically, I've created
I was experimenting with inheritance in javascript, and wrote those two functions: Object.prototype.inherits=function(obj){this.prototype=new obj;}
I've been experimenting with using Javascript object literal notation vs functions with prototypes and
I'm doing some experimenting with this malicious JavaScript line: var undefined = true; Every
I just started experimenting with Aptana Jaxer server side javascript engine for my next
I have been experimenting with using javascript to dynamically write stylesheets. In Firefox, one

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.