Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Monday, March 26, 2012

modal popup for a set time period

Is it possible to make a modal popup show for a couple of seconds then disappear?

yes.. use AJAX timer control

- place AJAX timer control in the form with required timeinterval
- by default make timer enabled=false
- enable timer whenever you show modal popup
- on timer_tick() hide modal popup and disable timer again

hope it helps..

Saturday, March 24, 2012

Modal popup with an image loaded from a database

I am having a bit of a problem using a modal popup which loads an image from a database. The image loads fine however the first time each image is loaded the modal popup is stuck at the top of the page with the very top of the modal extending over the top of the page. Once the image is cached and I attempt to view it again everything displays correctly. I'm not sure of the best way to fix this problem. Is there a way to have the popup only load once all of the data within the update panel has completely loaded? Here are a few code snippets so you can get an idea of what I'm doing.


I'm opening the modal when the selected item in the datagrid is changed.

protected void Grid_SelectionChanged(object source, EventArgs e)
{
dispIMG.ImageUrl ="viewImage.aspx?qIID=" + itemDG.SelectedItem.Cells[1].Text +"&sSide=Front";
 ModalPopupExtender.Show();
}
 
Any suggestions as to how I could fix this would be greatly appreciated.
 
cheers
 

any thoughts? I've tried using thread.Sleep to get the image to load before it actually opens the modal, but this doesn't seem to work. Once the image is initially loaded just simply scrolling the screen or reloading it makes everything display correctly. Banging my head on my desk for this one.

~David

Modal Popup Window is being closed with every button click

Hello,

I have a weird problem withModalPopupExtender. Every time a press any server sidebutton or link on my modal window themodal window is being closed. Is it normal behavior or I do something wrong ?


I need to implement the following scenario

1. Modal window withuser data is shown on the modal window. There are multiple buttons on the window something like assign location to a user etc….All of them require server side functionality.

Thank you,

Tory

Thank you,

Tory

Hi Tory,

This is expected. ModalPopup closes itself on a full postback - and regular button clicks will cause full postbacks. The solution is to wrap the contents of your ModalPopup inside an UpdatPanel so those other button clicks are just treated as partial postbacks.

Thanks,
Ted

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.