Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
3.40/5 (4 votes)
Hello Guys,

I am a asp.net student now days i am learning jquery and javascripte i need a help urgent please help me out
i want to open like this example site: Demo

please find column Various examples

and click on Non existing url

i want to open this dive

C#
 <div id="Popup" class="rf-item input" style="height: auto; width: 400px; display: none; background: transparent;" title="Demo Text">
                     Text here xyz...!
</div>

i want to open this dive when user click on asp:LinkButton

please teach me how can i open this modal popup window when user click on asp:LinkButton

i am trying this but its not working:

C#
<script>
         $(document).ready(function()
         {
           $("#asp:LinkButton ;).click(function()
           {
                $("#Popup").modal(
                     { persist: true,
                         maxheight:500,
                         autoResize:true,
                         onClose: function(dialog){}
                            }
                      });
             });

        </script>

Pleas help me out.

Thank You
Posted
Updated 11-May-12 0:11am
v2

refer this , it works:
Jquery Simple Modal plugin[^]
 
Share this answer
 
v2
Comments
VJ Reddy 12-May-12 23:22pm    
Good reference. 5!
HTML
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModalPopup.aspx.cs" Inherits="TestApplication.ModalPopup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
    <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css" rel="stylesheet" type="text/css" />

     <script type="text/javascript">
         $("#<%= btnModalPopup.ClientID%>").live("click", function () {
             $("#modal_dialog").dialog({
                 title: "jQuery Modal Dialog Popup",
                 buttons: {
                     Close: function () {
                         $(this).dialog('close');
                     }
                 },
                 modal: true
             });
             return false;
         });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="modal_dialog" style="display: none">
        This is a Modal Background popup
    </div>
    <asp:Button ID="btnModalPopup" runat="server" Text="Show Modal Popup" />
    </form>
</body>
</html>
 
Share this answer
 
how to resize the window width and height
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900