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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:50:11+00:00 2026-05-30T14:50:11+00:00

I am searching for a way to close a Javascript pop-up/message box (i.e. not

  • 0

I am searching for a way to close a Javascript pop-up/message box (i.e. not a NEW IE window, but a scripted alert()) that loads when a webpage is loaded.

I currently have code that loads data into a search form, runs the search, retrieves the needed information from the results, exits the search, then continues with the next item in a list. In some cases, there is a piece of critical information missing from the search results. When this happens, the JavaScript on the page pops up the message when the page loads, letting the user know that info is missing. With the automation the code halts(waits) for the box to clear before continuing, and the user must click on the OK button before this will happen.

(I have no way to change the source script of the page directly, as that is outside of my scope of responsibility here at work. Plus, it is more important to retain this functionality for general use; it would really only benefit this small-usage function I’m creating.)

While I can’t change the source script, I have found an example of how to prevent a pop-up/alert from displaying by changing the loaded script. However, it relates to an already-loaded page and doesn’t really work for me (as far as I can tell).

IE.Document.getElementById("clearRelItems").removeAttribute "onClick"
IE.Document.getElementById("clearRelItems").setAttribute "onClick", "return true;"

Is it possible to use this method to make a change before the page has fully loaded? i.e. can this be used to somehow bypass/circumvent the function call at page load?

I know about sendkeys, but I would prefer to avoid this option if at all possible (I may end up using this option if no other alternative exists). This function is intended to be initiated by the user, then left running in the background as it will take some time to complete.

I have looked into grabbing the XML as suggested by @Kyle, but I don’t believe I am proficient enough to make this method work.

How else might I get around the alert? Is there a way to actually activate the OK button on the alert? Can the alert/loading of the page be bypassed any other way?

  • 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-30T14:50:12+00:00Added an answer on May 30, 2026 at 2:50 pm

    One work-around could be to recognize when your script is stuck and then just send the keystroke “enter” to close the pop-up.

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

Sidebar

Related Questions

I am searching for a way to compress JavaScript code for the iPhone. Is
I'm searching for a way to create a menu in an iPhone app that
I'm searching the way(s) to fill an array with numbers from 0 to a
You can get underground processes by ps ux I am searching a way to
I'm searching for a way to auto compare an object propriety to a list
I was searching for a way of detecting in my C# code if the
I was searching for a way to insert an ellipsis in a C# path,
I've been unsuccessfully searching for a way to install make utility on my CentOS
I have been searching for a way to insert linebreaks in my code for
I'm basically searching for a way to pass instances across programs/processes without serializing the

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.