Showing posts with label missing. Show all posts
Showing posts with label missing. Show all posts

Monday, March 26, 2012

Calling a JavaScript function after return from callback in UpdatePanel

Hi all.

I am trying to solve this focusing problem inherint in Atas, I have a 90% generic solution, but am missing the last piece to the puzzle.

I need a way to invoke a JavaScript function after the UpdatePanel has returned from a server callback.

I know this is pretty simple to do without an UpdatePanel, unfortunately I am kinda tied into the UpdatePanel.

Any help??

Thanks

Hi,

I had the same problem. This is the solution I could found.
See this post for reference:http://forums.asp.net/thread/1290506.aspx

function pageLoad()
{
$object("_PageRequestManager").propertyChanged.add(BindOnLoad);
}


function BindOnLoad(sender, args)
{

if (args.get_propertyName() == "inPostBack"){
if (!$object("_PageRequestManager").get_inPostBack()){
AtlasPostBack();}
}
}

function AtlasPostBack()
{ //Runs at every postback. This allows us to run things that need to be taken care of
//after postbacks

alert("partial postback is done");
}


Thanks,

I also found that from the server side, registering a script as a startup script will make it fire on every callback.

Page.ClientScript.RegisterStartupScript.

Wednesday, March 21, 2012

CalendarExtender with a ModalPopupExtender and missing weekdays

Hi

I am trying to use a CalendarExtender inside a Panel being shown as a ModalPopup. The functionality is fine , however the calendar has cropped two days of it the week of a week meaning that I am only seeing fron Sunday till Thursday. How am I to fix this or work around it ?

<asp:LinkButton ID="LinkButton1" runat="server">Godkend</asp:LinkButton>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" BackgroundCssClass="modalBackground" CancelControlID="Button2" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" style="display:none">
<div >
<fieldset>
<legend>Detajler</legend>
<asp:RadioButtonList ID="RadioButtonList2" runat="server">
<asp:ListItem Value="0" Selected="True">Alle</asp:ListItem>
<asp:ListItem Value="1" >Valgte</asp:ListItem>
</asp:RadioButtonList>


<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Value="2" Selected="True">Godkendt</asp:ListItem>
<asp:ListItem Value="1">Afvist</asp:ListItem>
<asp:ListItem Value="0">Afventer</asp:ListItem>
</asp:RadioButtonList>
<asp:Label ID="Label4" runat="server" Text="Dato"></asp:Label><br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox2" >
</cc1:CalendarExtender>
</fieldset>
<div>
<asp:Button ID="Button1" runat="server" Text="Ok" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="Cancel" />
</div>
</div>
</asp:Panel>

Regards

I copied your code and it worked just fine for me. What timezone are you in?


I copied your code and it worked just fine for me. What timezone are you in?


I copied your code and it worked just fine for me. What timezone are you in?

I

I copied your code and it worked just fine for me. What timezone are you in?

I know

I copied your code and it worked just fine for me. What timezone are you in?


...


DisturbedBuddha:

I copied your code and it worked just fine for me. What timezone are you in?

I am in CET +1h. I can see others having experienced this issue also. They have been able to work around with some CSS tricks , but I have not been able to.

http://forums.asp.net/p/1089990/1642856.aspx