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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:42:05+00:00 2026-06-13T14:42:05+00:00

I am trying to implement a code in which when user clicks on Logout

  • 0

I am trying to implement a code in which when user clicks on Logout link then a warning message has to be dispalyed to the user which is

     This will terminate the session and close the browser. Do you want to continue?

My website is running on IE6 and IE7. I have written below piece of code to implment it.

    Sub OnClickLogout() 
dim Answer, msg
Msg = "This will terminate the session and close the browser. Do you want to continue?"
Answer = MsgBox(Msg, vbYesNo + vbExclamation, "Warning")
if Answer = vbYes then
window.opener = "y"
window.parent.opener= "x"
     window.parent.close

end if

End Sub

My code is working perfectly fine in IE6 and my window is closing properly.
But in IE7 when I click on Yes button then I am getting an extra message as follows:

“The web page you are viewing is trying to close the window. Do you want to close this window?” with Yes and NO button

I dont want this extra message. I was getting the same message in IE6 also but for that I searched and checked that you have to set the window.parent.opener = "Some String". But this is not working in IE7 Could you all suggest me how to remove this message in IE7

  • 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-13T14:42:06+00:00Added an answer on June 13, 2026 at 2:42 pm

    You can try this to avoid the Microsoft message in IE7:-

            window.opener="X"
            window.open "","_top"
            window.parent.close
    

    I am sure it will definitely work.

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

Sidebar

Related Questions

I'm trying to implement key-press functionality which will remove a div when the user
I am trying to implement SSE vectorization on a piece of code for which
I am trying to implement this package http://code.google.com/p/python-progressbar/ when downloading a file like below:
I am trying to implement this bit of code: func factorial(x int) (result int)
I'm trying to implement Orbit Slider in my homepage using this code: <script type=text/javascript
I'm trying to implement swiftmailer into this mailing system. my client has about 300k
The way this function will work: 1) The user clicks the button with ID
I'm trying to implement some code to import user's data from another service via
I am trying to implement an ISelectionListener in my eclipse plugin, which will track
I'm trying to implement a permission screen in which a user can be given

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.