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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:28:07+00:00 2026-05-22T11:28:07+00:00

I am using ModalBox ( http://okonet.ru/projects/modalbox/index.html ) on my website. It is set up

  • 0

I am using ModalBox (http://okonet.ru/projects/modalbox/index.html) on my website. It is set up and works fine, but I would like to make it open on page load in certain circumstances. In particular, I would like to have it open with a message when users log out. Right now when users log out, it goes to my homepage with a message in the page (I do this by loading index.php?loggedout=true when users log out and have the text show when the variable is true. Using this method (having ?loggedout=true) but loading with a ModalBox open instead of just text in the page body. Alternatively, if it could detect what page it came from without the variable and open then, that would be nice too.

tl;dr: How can I have a ModalBox open automatically on page load.

Edit: I tried putting

<script type="text/javascript">
if(window.location.search.indexOf('loggedout=true') !== -1) {
Modalbox.show('/data/loggedout',{width: 576, title: 'Logged Out'}); return false;
}
</script>

On my page, but that didn’t work.

  • 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-22T11:28:08+00:00Added an answer on May 22, 2026 at 11:28 am

    I achieved my desired result using

    <?php
    if ($loggedout=="true") { ?>
    <body class="slider-header" onload="Modalbox.show('/data/loggedout',{width: 576, title: 'Logged Out'}); return false;">
    <?php } else { ?>
    <body class="slider-header">
    <?php }; ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the project 'ModalBox' from http://okonet.ru/projects/modalbox/index.html in order to generate my modal.
I am using jQuery 1.7.1, jQuery Validations plugin (http://docs.jquery.com/Plugins/Validation) 1.9.0, jQuery SimpleModal plugin (http://www.ericmmartin.com/projects/simplemodal/)
Im trying to make a pop-up like window using jquery and its modal box.
i am using blockUI to show content in modalbox. On my content page there
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using JDeveloper , I started developing a set of web pages for a project
i am using Jqgrid http://trirand.com/blog its a very good grid solution, the linked one
I am using the css modal box described by Paul R.Hayes here - http://www.paulrhayes.com/experiments/modal/
I'm using FancyBox jquery plugin to display modal popup boxes. The site is: http://www.chatisfying.com
I am using modalbox for a modal window to submit forms that I learned

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.