?
Solved

Problem to Popup

Posted on 2016-10-27
2
Medium Priority
?
110 Views
Last Modified: 2016-10-31
Hi,
I do not know why I cannot show the popup as expected, by these codes below. Why?
$(function () {
    $("div[id$='Panel_Msg']").dialog({
        autoOpen: false,
        autoResize: true,
        resizable: false,
        title: "Error",
        appendTo: "form"
        //open: function (event, ui) {
        //    $(this).parent().appendTo("form");		//allow .Net buttons to post back
        //}
    });

});

function closePopup0() {
    $("div[id$='Panel_Msg']").dialog("close");
}

function openPopup0() {
    $("div[id$='Panel_Msg']").dialog("open");
}
...
    <div class="right up">
    <cc1:ToolkitScriptManager runat="server"></cc1:ToolkitScriptManager>
	<asp:panel id="Panel_Msg" style="display:none;" runat="server">
		<asp:Literal id="L_Msg" runat="server"/>
		<br /><br />
        <div style="text-align:center;">
		    <asp:Button id="OKButton" OnClick="closePopupMsg" runat="server" Text="OK"/>
        </div>
	</asp:panel>
    </div>
    ...

                    L_Msg.Text = "Invalid User ID and Password have been entered or you're disallowed to access!";

                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "call", "$(function () {openPopup0();});", true);

Open in new window

The details are now being shown on the Web page but I expect that the Popup would appear while now it does not.
0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 1000 total points
ID: 41864175
Why are you selecting for the "ends with" type of selection?

First off, the examples I've seen and used reverse the quotes:

Try
$('div[id$="Panel_Msg"]')

Open in new window

instead of what you have.  
$("[id$=Panel_Msg]")

Open in new window

might be another option.

Second, try
$('#Panel_Msg')

Open in new window

if you're not needing the ability to just find ID's ending with.

It's just my guess that the issue is with the selector here, though.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 41864855
But using the same codes on other Web project, everything is fine.

The problem is why the prompt message is now being shown on Web page and no Popup is shown.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question