There are only follow the three steps. it will getting a easy to set the popup background transparent. I tried to do this its good. Just copy and paste save the html file. put the code the warm server then only jquery file will work then it will open the popup. besides to use what you need.
<style> .blockbkg { background-color: black; opacity: 90%; filter:alpha(opacity=90); background-color: rgba(0,0,0,0.90); width: 100%; min-height: 100%; overflow: hidden; float: absolute; position: fixed; top: 0; left: 0; color: white; } .cont { background-color: white; color: black; font-size: 16px; border: 1px solid gray; padding: 20px; display:block; position: absolute; top: 10%; left: 35%; width: 400px; height: 400px; overflow-y: scroll; } .closebtn { width: 20px; height: 20px; padding: 5px; margin: 2px; float: right; top: 0; background-image: url(x.png); background-repeat: no-repeat; background-position:center; background-color: lightgray; display: block; } .closebtn:hover { cursor: pointer; } .normal { background-color: lightblue; width: 900px; min-height: 200px; padding: 20px; } </style>

Step:2

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript">
</script>

<script>
$(document).ready(function () {
$("#closebtn").click(function () {
$("#dlg").hide('800', "swing", function () { $("#bkg").fadeOut("500"); });
});
$("#opn").click(function () {
if (document.getElementById('bkg').style.visibility == 'hidden') {
document.getElementById('bkg').style.visibility = '';
$("#bkg").hide();
}
if (document.getElementById('dlg').style.visibility == 'hidden') {
document.getElementById('dlg').style.visibility = '';
$("#dlg").hide();
}
$("#bkg").fadeIn(500, "linear", function () { $("#dlg").show(800, "swing"); });
});

});
</script>

Step:3

<body> <div class="normal"> <h1>Modal Dialogs</h1> <p> This is an example of how to create <strong>modal dialog popup windows</strong> for your pages using javascript and CSS. Modal dialog popups are better than window-based popups, because a new browser window is not required and the user does not have to leave the page. This is great for when you need an easy way for the user to carry out a specific action on the same page and control the modality of the window. </p> <p><a href="#" id="opn">Click here</a> to display the javascript modal popup dialog!</p> </div> <div class="blockbkg" id="bkg" style="visibility: hidden;"> <div class="cont" id="dlg" style="visibility: hidden;"> <div class="closebtn" title="Close" id="closebtn"></div> <h1>Hello World!</h1> <p> This is a neat little trick to get a modal popup dialog box in your web pages without disturbing the user experience or dsitracting them with popup windows or new tabs... </p> <p> The <strong>popup dialog</strong> uses javascript (jQuery) and CSS to create a modal dialog that will retain focus over the parent window until it is closed. The trick is simple. We use block-elements (divs) to create the dialog window. The CSS rules for <em>position</em>, <em>float</em>, <em>top</em>, <em>left</em>/<em>right</em>, and <em>opacity</em> (or CSS3 transparency) allows us to create a semi-transparent div over the entire page, thereby creating the illusion of modalness. The other div then takes focus over the center of the window. </p> <img src="https://sheriframadan.com/examples/uploadit/uploads/50f00e1434e8b.jpg" width="200" height="252"> <p> We can also retain content view control over the modal dialog with the <em>overflow</em> CSS property. This means no matter what we place inside of our dialog window the content will remain inside of the defined bounds even if scrolling becomes necessary within the div. </p> </div> </div> </body> <html>
Read more ...

This is drop down list how to bind in asp.net using C sharp and just create object then pass that drop down id. see the following code step by step.
Step:1

Just create a HTML code like this and then SkinID its not important.
<table><tr><td>  <asp:DropDownList ID="ddlAddCompanyUser" runat="server" SkinID="dropdownlist_large"
                                AutoPostBack="true" OnSelectedIndexChanged="ddlAddCompanyUser_SelectedIndexChanged">
                            </asp:DropDownList></td></tr></table>
Step:2

This code write back end like this and pass the drop down list id and then if u want the selected value for some further process. just write a OnSelectedIndexChanged get the values. then just the pass the method name in OnLoad_page(){LoadAddCompanyUser()}
private void LoadAddCompanyUser()
    {
        List<Company> objCompanyList = Company.GetAllCompany(); // Company table object
        objCompanyList = objCompanyList.OrderBy(c => c.CompanyName).ToList();
        
        ddlAddCompanyUser.Items.Clear();
        ddlAddCompanyUser.DataSource = objCompanyList;
        Utility.BindDropDownList(ddlAddCompanyUser, "CompanyName", "CompanyID", "-------- Select Company -------");
    }
Step:3
Its using for get the value while the select value.
protected void ddlAddCompanyUser_SelectedIndexChanged(object sender, EventArgs e)
    {
  string CompanyName=(ddlAddCompanyUser.SelectedItem.Value));
    }
Read more ...

code is creating drop down menu using JavaScript. I can also used this code its working correctly. Its may be useful.

Step:1

Click here to download the jquery file.

<script type="text/javascript" src="JS/jquery.js"></script>
<script type="text/javascript">
 $(document).ready(function(){
 
 // This hides the menu when the page is clicked anywhere other than the menu.
  $(document).bind('click', function(e) {
   var $clicked = $(e.target);
      if (! $clicked.parents().hasClass("menu")){
          $(".menu dd ul").hide();
    $(".menu dt a").removeClass("selected");
   }

  });
  
  $(".menu dt a").click(function() {

   var clickedId = "#" + this.id.replace(/^link/,"ul");

          // Hides everything else that the current menu 
   $(".menu dd ul").not(clickedId).hide();

          //Toggles the menu.
   $(clickedId).toggle();

          //Add the selected class.
   if($(clickedId).css("display") == "none"){
    $(this).removeClass("selected");
   }else{
    $(this).addClass("selected");
   }

  });
  
// This function shows which menu item was selected in corresponding result place
  $(".menu dd ul li a").click(function() {
   var text = $(this).html();
   $(this).closest('dl').find('.result').html(text);
      $(".menu dd ul").hide();
  });

  
 });
</script>

Step:2

Its CSS class using this class and change the images and image path.


<style type="text/css">

 .menu dl{ margin-left:5px; }
 .menu dd, .menu dt, .menu ul 
 { margin:0px; padding:0px; }
 .menu dd { position:relative; }

 
 .menu dt a {background:#EEEEEE 
 url(Images/privacyOff.png) no-repeat scroll right center;
  display:block; width:40px; height:22px; cursor:pointer;}

 .menu dt a.selected{
  background:#EEEEEE url(Images/privacyOn.png) 
  no-repeat scroll right center;
 }
 .menu dt a span {
 cursor:pointer; display:block; padding:5px;}

 .menu dd ul { 
 background:#EEEEEE none repeat scroll 0 0; display:none;
  list-style:none; padding:3px 0; position:absolute;
  left:0px; width:160px; left:auto; right:0; 
  border:1px solid #656565; cursor:pointer;
  }
 .menu dd ul li{ 
 background-color:#EEEEEE; margin:0; width:160px;
 }
 .menu span.value { display:none;}
 .menu dd ul li a { 
 display:block; font-weight:normal; width:137px; 
 text-align:left; overflow:hidden; padding:2px 4px 3px 19px; 
 color:#111111; text-decoration:none;
 }
 .menu dd ul li a:hover{ 
 background:#656565; color:white; text-decoration:none; 
 }
 .menu dd ul li a:visited{ 
 text-decoration:none; 
 }
</style>


Step:3 

 Its a HTML code just code and past change some thing in your drop down menu list.

<html><head>
</head>

<body>
<div style="clear:both;">.</div>
 <div style="width:500px; margin:auto;">
  <h1 style="margin:20px 0;">Facebook menu Menus</h1>

 <div style="height:300px;">
   <div style="width:162px;">
       <dl style="" class="menu">
          <dt>
       <a class="" id="linkglobal" 
       style="cursor: pointer;"></a></dt>
     <dd>
               <ul style="display: none;" id="ulglobal">
                   <li><a href="#">My Account</a></li>
                   <li><a href="#">My Profile</a></li>
                   <li><a href="#">My Product</a></li>
                   <li><a href="#">My Feature</a></li>
             </ul>
          </dd>
       </dl>
   </div>
 </div>
  </div>
</body></html>
Output:
Read more ...


This function password mode set "Readonly" using Javascript function. I have used.When I try to edit password that time will show the text mode and editable otherwise that text are "Readonly".


<input type="text" id="mytextbox" value="click the button below."/>
<input type="button" value="click" onclick="changeText();"/>

function changeText(){
   var text_box = document.getElementById('mytextbox');
    if(text_box.hasAttribute('readonly')){   
        text_box.value = "This text box is editable.";
        text_box.removeAttribute('readonly');
    }else{       
        text_box.value = "This text box is read only.";
        text_box.setAttribute('readonly', 'readonly');   
    }
}
Read more ...

check Password Strength using Jquery in asp.net:
Password strength checking is an easy way to show the strength of user password on the registration forms. It helps users to choose more secure password when filling the forms.

The idea is that every time a user enters a character, the contents is evaluated to test the strength of the password they have entered... I'm sure everyone has seen these before.


That’s all. Here’s the full jQuery code:


<link href="FormValidation.css" rel="stylesheet" type="text/css" />
    <link href="jquery.validate.password.css" rel="stylesheet" type="text/css" />
    <script src="JS/jquery.js" type="text/javascript"></script>
    <script src="JS/jquery.validate.js" type="text/javascript"></script>
    <script src="JS/jquery.validate.password.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    
    
     $(document).ready(function() {
         // validate signup form on keyup and submit
         var validator = $("#divCreateNewUser").validate({
             rules: {
                 username: {
                     required: true,
                     minlength: 2
                 },
                 txtPassword: {
                     password: "#username"
                 },
                 password_confirm: {
                     required: true,
                     equalTo: "#password"
                 },
                 location: {
                     required: true
                 }
             },
             messages: {
                 username: {
                     required: "Enter a username",
                     minlength: jQuery.format("Enter at least {0} characters")
                 },
                 password_confirm: {
                     required: "Repeat your password",
                     minlength: jQuery.format("Enter at least {0} characters"),
                     equalTo: "Enter the same password as above"
                 },
                 location: {
                     required: "Enter a Location"
                 }
             },
             // the errorPlacement has to take the table layout into account
             errorPlacement: function(error, element) {
                 error.prependTo(element.parent().next());
             },
             // set this class to error-labels to indicate valid fields
             success: function(label) {
                 // set &nbsp; as text for IE
                 label.html("&nbsp;").addClass("checked");
             }
         });
     });
</script>




<body>
    <form id="signupform1" runat="server">
    <div id="signupwrap" runat="server">
    <table align="center">
    <tr>
    <td></td>
    <td><b>User Registration</b></td>
    <td></td>
    </tr>
    <tr>
    <td align="right" class="label">UserName:</td>
    <td  class="field"><asp:TextBox ID="username" runat="server"/></td>
     <td class="status"></td>
    </tr>
    <tr>
    <td  align="right" class="label">Password:</td>
    <td  class="field"><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"/></td>
     <td class="status" align="left">
     <div class="password-meter">
        <div class="password-meter-message">&nbsp;</div>
        <div class="password-meter-bg">
         <div class="password-meter-bar"></div>
        </div>
       </div>
     </td>
    </tr>
    <tr><td align="right" class="label">Confirm Password:</td>
    <td  class="field"><asp:TextBox ID="password_confirm" runat="server" TextMode="Password"/></td>
     <td class="status"></td>
    </tr>
   <tr>
    <td align="right" class="label">Location:</td>
    <td  class="field"><asp:TextBox ID="location" runat="server"/></td>
     <td class="status"></td>
    </tr>
    <tr>
    <td></td>
    <td><asp:Button ID="btnSubmit" Text="Submit" runat="server" 
            onclick="btnSubmit_Click" /></td>
     <td></td>
    </tr>
    <tr>
    <td colspan="3" height="20px">
    </td>
    </tr>
    <tr>
    <td></td>
    <td colspan="2">
    
        <table>
   <tr>
   <td>UserName:</td>
   <td><asp:Label ID="lbluser" runat="server"/></td>
   </tr>
   <tr>
   <td>Password:</td>
   <td><asp:Label ID="lblPwd" runat="server"/></td>
   </tr>
    <tr>
   <td>Location:</td>
   <td><asp:Label ID="lblLocation" runat="server"/></td>
   </tr>
    </table>
    </td>
    
    </tr>
    </table>
    </div>
    </form>
</body>
 
download: click here to download the source code for jquery password strength indicator.

Out-put of the above code 


Read more ...

Related Posts Plugin for WordPress, Blogger...