Reputation: 7628
This is the code I am trying and not working, nothing comes up at all
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
<script type="text/javascript">
function HandleIt()
{
var objA = $get('<%= chkBox.ClientID %>');
if(objA.checked == false)
$("#dialog").dialog();
//alert("it works");
}
</script>
<div style="width: 800px;">
<asp:ScriptManager ID="ScriptMan1" runat="server" />
<div class="dialog">
<div class="a">
<asp:Label ID="lbla" runat="server" CssClass="text" />
</div>
<div class="b">
<asp:Label ID="lblb" runat="server" CssClass="text" />
</div>
</div>
Code I given down works when dialog when it is like this,
<div class="dialog"> Hahahahaha </div>
I want to use it as message box but its not working out.
Upvotes: 0
Views: 193
Reputation: 819
See here are the jQuery selector. You will get the briefly knowledge on it....
and replace your following code
$("#dialog").dialog();
With below code
$(".dialog").dialog();
And ya please see the jquery selectors...
Upvotes: 2
Reputation: 7894
Because your selector is catches tag with id's and you need hit by class. Try to change your selector to this one: $(".dialog").dialog();
Upvotes: 2