Showing posts with label perfectly. Show all posts
Showing posts with label perfectly. Show all posts

Monday, March 26, 2012

Modal PopUp problem

Hi guys, my name is steven.i have a problem with modalpopupextender.

i have a linkbutton as the targetcontrolid.

the modalpopupextender runs perfectly as i click the linkbutton, but the code inside linkbutton_click was not executed.

my question is how can i execute the code inside linkbutton_click?

thanx for the sharing.

That is because the ModalPopup prevents the default event so no other handlers will be called. If you would like code to execute before or after the modalpopup window is shown you can hook into the 'showing' or 'shown' events. Here is alink to a postthat shows how to do that.

_onShow :function(e) {

/// <summary>

/// Handler for the target's click event/// </summary>/// <param name="e" type="Sys.UI.DomEvent">/// Event info/// </param>if (!this.get_element().disabled) {this.show();

e.preventDefault();

returnfalse;

}

},


mmm i kinda confuse...

here what i want to do, i have a linkbutton as the targetcontrolid from modalpopupextender.

the popupcontrolid is panel1. inside panel1 there is a detailsview in readonly mode.

when i click the linkbutton i want the popup show and the detailsview is in insert mode.

can you tell me how?

thanx so much.

Modal popup rendered inside two server controls doesnt work

I'm using the Modal popup from inside a server control named A. When I use the server control from a Page it works perfectly. But when I insert the server control A inside another server control named B, all Modal popup elements are render in page starting absolute position 0,0 where the control A is positioned inside B. I don't find a way to solve this. Any idea?

I will really appreciate any help. Thanks,

JoanBGood.

Please post the code

Saturday, March 24, 2012

Modal window with update panel stops working after its shown and hidden once

I'm having some trouble with the modal window tool. It behaves perfectly the first time i show it, and the first time I hide it, then although the updatepanel postback behaviour still works (and the text field in the example below is still updated) the modal window doesn't fire the onOkScript or hide as it does the firsttime.

Does anyone have any ideas?

<div><asp:LinkButtonID="lbCommunityProfile"runat="server">Community Profile</asp:LinkButton></div><atlas:UpdatePanelID="updatePanel2"runat="server"Mode="Always"><ContentTemplate><asp:LabelID="lTest"runat="server"Text="NoneSet"></asp:Label></ContentTemplate></atlas:UpdatePanel><atlasToolkit:ModalPopupExtenderID="ModalPopupExtender1"runat="server"><atlasToolkit:ModalPopupPropertiesTargetControlID="lbCommunityProfile"PopupControlID="Panel1"BackgroundCssClass="modalBackground"DropShadow="true"OkControlID="OkButton"onOkScript="__doPostBack('ctl00$ContentPlaceHolder$lbCommunityProfile','');alert('go');"CancelControlID="CancelButton"/></atlasToolkit:ModalPopupExtender><asp:PanelID="Panel1"CssClass="modalPopup"runat="server"><atlas:UpdatePanelID="updatePanel1"runat="server"Mode="Conditional"><ContentTemplate>

This is panel 1

<asp:TextBoxID="tbTest"runat="server"></asp:TextBox><asp:ButtonID="OkButton"runat="server"Text="OK"OnClick="OkButton_Click"UseSubmitBehavior="false"></asp:Button><asp:ButtonID="CancelButton"runat="server"Text="Cancel"></asp:Button></ContentTemplate></atlas:UpdatePanel></asp:Panel>

and in the aspx.cs file

protectedvoid OkButton_Click(object sender,EventArgs e)

{

string str = tbTest.Text;

lTest.Text =

"set" + tbTest.Text +"end";

}

Also just wondering what the javascript is to close a modal window. I understand you can use the ok and cancel buttons. I'd like to have a x in the top right of my window and have that close.


Is this with the June CTP of Atlas?
yes the most recent ctp

yes the july ctp


The June CTP is currently (this may change very soon) the most recent Atlas release. It has a problem whereby UpdatePanel updates under Firefox break all extenders. It sounds like you're hitting this problem. Atlas is aware of it and should have a new release out soon to correct the problem. Thanks for your patience!

Just wondering if any progress has been made on this topic?


The July CTP of Atlas fixes the problem mentioned above.
I am experiencing this problem with the July CTP. Appears to notnecessarilybe fixed. I've got a lot of other things goin on in the same page... I'm going to try and issolate the issue.