Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    1
    Member #
    17725
    Hi friends and professionals. Here is the HTML I have written for showing a DIV when user clicks on Login. I want to make that DIV model. Means, No other area of the page should not be accessible till user closes this DID by clicking on Login, which appears in DIV. Can we make that? plz explain me how.

    <html>
    <head>
    <title>DIV dialog essentials</title>
    </head>
    <style type="text/css">
    .background {
    background-color: #D7EFFF;
    }
    </style>
    <script type="text/javascript">
    function DisplayDiv( evt) {
    var element = document.getElementById("display");
    element.style.left = 350;
    element.style.top = 200;
    element.style.display = "block";
    }
    function HideDiv() {
    var element = document.getElementById("display");
    element.style.display = "none";
    }
    </script>
    <body>
    <a onClick="DisplayDiv(event)">Login</a>
    <div id="display" class="background" style="width:341px; height:142px; position:absolute; display:none; left:335px; top:154px; background-color: #D7EFFF; layer-background-color: #D7EFFF; border: 1px solid #000000;">
    <div id="fields" class="background" style="position:absolute; left:27px; top:21px; width:298px; height:113px; z-index:1">
    <table width="97%" height="113" border="0" align="center" cellpadding="3" cellspacing="0">
    <tr>
    <td width="37%"><strong><font size="2" face="Arial, Helvetica, sans-serif">Username</font></strong></td>
    <td width="63%"><input type="text" name="textfield"></td>
    </tr>
    <tr>
    <td height="22"><strong><font size="2" face="Arial, Helvetica, sans-serif">Password</font></strong></td>
    <td><input type="password" name="textfield2"></td>
    </tr>
    <tr>
    <td height="31" colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td colspan="2"><div align="center"><button type="button" onClick="HideDiv()">Login</button></div></td>
    </tr>
    </table> <div align="center"></div>
    </div>

    </div>


    </body>
    </html>

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com