jquery - Hidden Modal showing when $(document).ready alert called -


I have a form that has a model pop up which hides until the button is pressed.

When the page loads, I want to display a warning to the user, and I'm trying to use it jquery

But when the warning is shown, Then the Madple popup appears, after which I click OK, the warning then hides the modal popup. Obviously, there is a better way to do this, do anyone have any advice?

Here is the code: Thank you

  & lt; Asp: Content ID = "Content1" content placeholder id = "head content" run = "server" & gt; & Lt; Style type = "text / css" & gt; .modalBackground {background-color: gray; Z-index: 10000; Filters: alpha (opacity = 80); Opacity: 0.8; } .hiddenElement {display: none; } .ModalContainer {Status: Completed; Display: Table; Background color: white; Border: 1 px solid gray; } & Lt; / Style & gt; & Lt; Script language = "javascript" type = "text / javascript" & gt; $ (Document) .ready (function () {warning ('login in');}); & Lt; / Script & gt; & Lt; / ASP: Content & gt; & Lt; Asp: Content ID = "Content2" content placeholder id = "main content" run = "server" & gt; & Lt; Asp: UpdatePanel id = "up" runat = "server" & gt; & Lt; ContentTemplate & gt; & Lt; ASP: Button ID = "BTN Click" Run = "Server" Text = "Click Me" OnClick = "btnClick_Click" /> & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt; & Lt; ASP: Hildfield ID = "HiddenModeloror" runat = "server" /> & Lt; Asp: ModalPopupExtender ID = "moremodel" targetcontrol id = "hidden modal" runat = "server" drop-out = "false" popup control id = "pnlMoreInfo" background = "modlbackground" /> & Lt; ASP: Panel ID = "pnlMoreInfo" runat = "Server" CssClass = "Hidden Model Model Container" & gt; & Lt; Asp: UpdatePanel id = "up_more" runat = "server" updatemod = "conditional" & gt; & Lt; ContentTemplate & gt; & Lt; Table & gt; & Lt; Tr align = "center" & gt; & Lt; Td colspan = "2" & gt; Test & lt; / Td> & Lt; / TR & gt; & Lt; Tr align = "center" & gt; & Lt; Td colspan = "2" align = "center" & gt; & Lt; Asp: button id = "btnSave_MoreInfo" runat = "server" text = "save" OnClick = "btnSave_MoreInfo_Click" /> & Lt; Asp: button id = "btnCancel_MoreInfo" runat = "server" text = "cancel" OnClick = "btnCancel_MoreInfo_Click" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt; & Lt; / ASP: Cell & gt; & Lt; / Asp: Content & gt;  

Set the initial style on the model dialog: None in the CSS or in the element where you make it, if UI elements depend on the drabid to hide the elements, then they have to start the hostel before the window starts loading Has the ability to do


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -