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

  • Home
  • SEARCH
  • 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 8626925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:08:52+00:00 2026-06-12T08:08:52+00:00

Good afternoon chaps.. I’m trying to create a function in Javascript that generates an

  • 0

Good afternoon chaps..

I’m trying to create a function in Javascript that generates an on screen dialog similar to the msgbox function in VB/VBA. I’ve so far managed to code the msgbox function in Javascript so that when it is called it dynamically creates a dialog on screen.

It works like this:-

if (msgbox("Do you want to continue", YesNo) == Yes) {
      //Do something here
}

What I would like to know is this – is there any way I can halt/pause the flow in code until one of the buttons in my dynamically generated dialog is pressed? I don’t want the ‘Do Something here’ bit or any other following code to run until a user has clicked the ‘Yes’ button in my dialog.

(NOTE: YesNo and Yes, in the example above are constants. The dialog works perfectly up to this point I just need to figure how to stop flow until a button is pressed without overcomplicating things).

Mat

  • 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-12T08:08:54+00:00Added an answer on June 12, 2026 at 8:08 am

    If you use the confirm box this should work for you – it fires a prompt with ok/cancel options:

        if (confirm("Are you sure you wish to continue?")){
    //executed when OK clicked
    }
    else{
    //executed when CANCEL clicked
    }
    

    Note workflow is paused in the function until an answer is given

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

Sidebar

Related Questions

Good afternoon all, I am building a function that takes a string as input,
Good afternoon all, I was taught that when a function returns, The variables (within
Good afternoon, I've run into some issues trying to combine HTTP caching with Rack::Cache
Good afternoon I have a table that has customer id, name, computer, laptop, blah,
good afternoon, I am trying to display a list of items in a table
Good afternoon all. I am aware that if we close() an java.io.OutputStream , it
Good afternoon all, I was wondering why is it that android.app.Activity.onTrimMemory couldn't be overridden?
Good Afternoon, I have a Joomla! template that keeps throwing up a pop up
Good afternoon people's I have built a jquery plugin that I use on my
Good afternoon, does anyone know of a library that would allow me to read

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.