There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Model dialog box web page


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
ctky's Avatar
Junior Member with 10 posts.
 
Join Date: Nov 2004
Experience: Intermediate
27-Mar-2005, 10:25 PM #1
Model dialog box web page
Hi, I am stuck here. Since I am new to web pages development, I need someone to guide me how to create a web page that, after 30 seconds, pop up a modal dialog box requesting the user to enter a password.

Once the correct password is entered, then the user can proceed to use the browser.

I would appreciate any help on this matter. Thank you sirs.
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
28-Mar-2005, 03:10 AM #2
showModalDialog windows are only supported by Internet Explorer.

You can however simulate one by popping up a sized window and using an onblur event on it. However, if the window pops up automatically, popup blockers are going to block it, so for most, they wouldn't see the popup.

You can also popup a div with a form in it, which might be better.

This thread will help.
http://forums.techguy.org/t337045.html

Now if you just want to keep popping up a prompt, until the person enters the right password, then you can do that like this:

Code:
<script type="application/x-javascript">
    function go() {
        while(1) {
            var pw = prompt("enter password to use this page","");
            if (pw == "thepassword") {
                break;
            }
        }
    }
    setTimeout("go()",30000);
</script>
*use type="text/javascript" if you need to support ol' internet explorer.

Of course all the user has to do is view the source of the page to see the password.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run

Last edited by Shadow2531 : 28-Mar-2005 03:27 AM.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:35 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.