Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 809487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:44:15+00:00 2026-05-15T00:44:15+00:00

I have a really odd behavior here: I created a little popup dialog in

  • 0

I have a really odd behavior here: I created a little popup dialog in jQuery UI, and in my test HTML page, it works flawlessly. When I click on the button, the popup comes up, covers the background, and remains on screen until I click on one of the two buttons (OK or Cancel) provided.

So now I wanted to add this into my ASP.NET 3.5 app. I wanted to add it to a GridView inside a user controls (ASCX), which is on a page (ASPX) contained inside a master page.
The jQuery 1.4.2 and jQuery UI 1.8.1 scripts are referenced on the master page:

<body>
<form id="XXXXXX" runat="server">
    <Ajax:ScriptManager ID="masterScriptManager" runat="server" ScriptMode="Auto">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery-1.4.2.min.js" />
            <asp:ScriptReference Path="~/Scripts/jquery-ui-1.8.1.custom.min.js" />
        </Scripts>
    </Ajax:ScriptManager>

I had to change this to use the Ajax script manager, since adding them to the as never worked.

So in my gridview, I have a column with image buttons, and when the user clicks on those, I am calling a little javascript function to show the jQuery UI dialog:

function showDialog()
{
    $("#dlg-discount").dialog('open');
    $("#txtAmount").focus();
}

When I run this page in MS IE 8, I get a separate page, and at the top of the page, I get the contents of my , with proper background color and all. In Firefox 3.5.6, I do get the dialog as a popup.

In both cases, the dialog page/popup disappears again after a second or less – without me clicking anything!

It seems similar to this question but the solution provided there doesn’t work in my case. This one here also seems similar but again: the solution presented doesn’t seem to work in my case…

Any ideas / hints / tips on what the h**** is going on here??

Thanks!

Update: OK, one problem is solved – it appears that for whatever reason, the default MS Ajax stuff is adding some kind of an “observer” to my popup dialog and closes it right away after it shows up 🙁

So I changed the OnClientClick="showDialog();" to OnClientClick="showDialog(); return false;" and how that doesn’t happen anymore – the dialog box pops up and stays there until I click on either of the two buttons (OK and Cancel).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:44:16+00:00Added an answer on May 15, 2026 at 12:44 am

    Where are you creating the dialog? There should be some code like this which gets called when the DOM is ready;

    $(document).ready(function(){
    
      var dialogOpts = {
        autoOpen: false,
        modal: true,
        width: 620,
        height: 660
      };
    
      $("#dlg-discount").dialog(dialogOpts);
    
    }
    

    And then you can call $("#dlg-discount").dialog('open') in your onclick method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some really odd behavior surfacing with IE9, :hover, and the CSS background
I'm really hoping someone can help me out here. I have a DataGrid in
I have a really odd error: [04-Jun-2010 15:55:32] PHP Catchable fatal error: Object of
I have run into a really odd bug with FF3.5.9 (and potentially lower) where
I have a really odd issue with WMI that I'm running into on a
I have really odd user requirement. I have tried to explain to them there
I'm seeing really odd behavior in string concatenation in PowerShell. At first I was
I have a really odd problem. I am using an upload form to upload
I have a really odd 2104 error occurring when I am hosting a Silverlight
I am having a really odd problem with Flash CS4. I have a MovieClip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.