Showing posts with label displayed. Show all posts
Showing posts with label displayed. Show all posts

Monday, March 26, 2012

Modal Popup OnClick (Server Side) Issues

I'm utilizing a modal popup to allow a user to enter a new record for a gridview on the screen. Once the modal popup is displayed (via clicking a link button), the user enters some values in some textboxes and the user clicks the save button. At this point the application executes the code in the code-behind for the button. However, if this is the first viewing of the screen (i.e. I just pressed play in visual studio), the values of the textboxes contained within the panel contain blank values (even though the user entered values).

The second strange thing that occurs, is if this is not the first viewing of this page and I click the link to display the modal popup, enter the text and click save, the OnClick (server side) fires twice.

Has anyone run across this issue? If so, how did you resolve it?

Thanks in advance,

Brian

Please try your scenario with the recently available61106 release of the Toolkit (and ASP.NET AJAX Beta 2). If the problem persists, then please reply with acomplete, self-contained sample page that demonstrates the problem so that we can investigate the specific behavior you're seeing. Thank you!

If you are using the Official Beta 2 release - don't use it (As David recommended) - unless they updated the bits on the day they posted it as Beta 2 Release -its broke...- go to the source tab and download today's release...about 1/3 of the controls with the 'official Beta 2 ' release would exhibit that behavior (the accordian - would never accept user clicks, drag panel never dragged, always visible just remained visible in one spot, and the modal exhibited your issues... had something to do with types function or something...If you are using Beta 1 or Atlas - it will be more about how you are wrapping the modal - you should place it in its own update panel even if you are attaching it into every row. I personally have the modal as a single instance and I control the modal show and hide in codebehind... examples are in my blog entries...

Saturday, March 24, 2012

ModalPopup

hi guys,

I copied the tool kit dll and I tried the modal popup. I made it work but the modal window is displayed somewhere on the right hand side corner and only cancel button is visible. How can I make it to be displayed in the center?

Second, how can I make the window to be disabled when the poup is shown? please advice. Thanks a lot!

here is the html code:

<atlasToolkit:ModalPopupExtenderID="ModalPopupExtender"runat="server"><atlasToolkit:ModalPopupPropertiesTargetControlID="LinkButton1"PopupControlID="Panel1"BackgroundCssClass="modalBackground"DropShadow="true"OkControlID="OkButton"OnOkScript="onOk()"CancelControlID="CancelButton"/></atlasToolkit:ModalPopupExtender>

<

divstyle="display:none;"><center><divID="Panel1"class="modalPopup">

POP UP

<asp:Buttonid="OkButton"runat="server"text="OK"></asp:Button><asp:Buttonid="CancelButton"runat="server"text="Cancel"></asp:Button></div></center</div>

<

asp:LinkButtonid="LinkButton1"runat="server"text="Click here to view modal popup"></asp:LinkButton></p>

Please help! Also is there anay way when I click on the linkbutton, perform somejavascript that populates the popup window content?

Thanks lot!

Hi

Can you make sure you have the correct css in place e.g

/*Modal Popup*/
.modalBackground {
background-color:Gray;
filter:alpha(opacity=70);
opacity:0.7;
}

.modalPopup {
background-color:#ffffdd;
border-width:3px;
border-style:solid;
border-color:Gray;
padding:3px;
}

This should make it dispkay correctly.

HTH


As for your second question you could have script such as

function SetModalContent()

{

$('Panel1').innerHTML = "YOU CONTENT HERE";

}

and then just add the call to this function on your linkbuton.


I have the same problem. But my popupbox is shown in the upper left corner.

I have copied the code and the css, but I still have this problem.

And the background is doesn't change color when the popup is shown.

I have downloaded all the ATLAStoolkit examples. If I run that code modalpopup works as it should.

I think I have missed a little thing but what ?


Sorry - I solved the problem myself.

For som reason I had a space between ! and DOCTYPE in<!DOCTYPE ...


can you send me the html part of your code?


There is a bug in the ModalPopup JS that causes it to popup in the top left corner of the screen if the doctype is incorrect or if no doctype is used. The solution to this problem is posted here

http://forums.asp.net/thread/1322436.aspx

Just replace the javascript and rebuild the AtlasControlToolkit project.