Showing posts with label atlas. Show all posts
Showing posts with label atlas. Show all posts

Wednesday, March 28, 2012

modal popup error - cant set focus to control

Hi

My webpage contains a modal popup. I am using the atlas release - the june ctp i think

I'm getting an error on my webpage if I view it in Internet Explorer 6. This is the error

Can't move focus to the control because it's invisible not enabled or of a type that does not accept focus

I get this error on page load. Everything works fine but naturally i dont like the error message.

I would really appreciate it if you could take a look and shed some light on it for me

http://84.92.22.217/UChoose/frames.aspx

thanks a lot

andrea

I checked your website and did not see any error message. Everything works fine.
No issues here with IE6 or Firefox 1.5.0.8.

Monday, March 26, 2012

Modal Popup Offset in website with Master Page

Hi.

I am using the Atlas modal popup tool in my website. However, the popup covers only the ContentPlaceHolder tag area and the other parts of the Master Page, namely the header and the leftcolumn (where I have menu options) are not covered. Curiously, the alpha filter seems to be offset by the area of the header and the leftcolumn. This really has me stumped. Any help would be deeply appreciated.

I am using tables to align my controls, but removing the Panel that is displayed as the modal popup from the table and placing it below the table seems to have no affect.

Thanks!

I think you'll findthis thread helpful.
Thanks for the link. It was helpful and I was able to sort my problem. The problem was that one of the div tags that wraps around all my content had the position set to "relative". A very basic error I guess, but I am a beginner after all!! Thanks again for the reply and link.

Modal Popup Locks Up After Codeplex Upgrade

My modal popup quit working after I updated the Atlas Control Toolkit to60731 Production - 7/31/2006. Yes I'm at the latest version of Atlas also. My modal popup worked before, with the exception of the drowdownlist still being active and not grayed out. I was hoping that the newer version would fix this. Now when I click on the image control the dropdownlist controls disappear and thats it. Any help would be great....

Hi James,

In the latest update to the Toolkit the ModalPopup was extended to hide elements like<select> when it was displayed so they would not show through the transparent overlay (due to a bug in IE). It's supposed to be shown again as soon as the modal popup is completed. If that's not happening for you, could you provide more details about your situation?

Thanks,
Ted

I figured it out. My panel was inside a div tag. I was using this div tag to hide the panel like this<divstyle="display: none">. I Removed the div tag and added the style to the panel like this <asp:PanelID="PanelDate"runat="server"CssClass="modalPopup"style="display:none">. I do not know if this is a new but because it use to work the other way. Any how thanks for replying back.

Saturday, March 24, 2012

Modal Popup, DetailsView and UpdatePanel combined.

Hi all, this is my first foray into Atlas (and ASP.net) and I have come stuck with the following problem:

I am developing a simple lookup screen that lists users names along with email addresses in a GridView. There is a DetailsView control that allows insertion of new users as required. The lookup is contained within an updatePanel so only this portion of the page is refreshed when items are added, deleted, or changed. This works fine until:

I put the DetailsView into an atlas ModalPopup and have an 'Add User...' button. At this point the whole page refreshes and I cannot for the life of me get it to work correctly.

I have tried everything I can think of, scoured the web and forums but still no luck. I can get two of the three items (UpdatePanel, DetailsView, ModalPopup) working at once but the addtion of the third causes it all to go horribly wrong.Confused [*-)]

Can anyone out there help me?

Try adding UseSubmitBehavior="false" to the button that's causing the refresh. If that doesn't help, please post a simple sample demonstrating the problem. Thanks!

ModalDialogExtender issues...

A little help on this one. I downloaded the refreshed ATLAS toolkit and am trying to implement the new ModalDialogExtender into my app. I'm able to get the dialog box to appear so thats great news...

However, the dialog appears in the upper left corner of the screen and the background is not disabled...

I took the sample implementation and applied it to my app just to get off the ground so I'm not sure what I'm doing wrong. I looked at the styles "modalBackground" and "modalPopup" but didn't see anything jumping out at me...

.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;
}

Any thoughts..??

Post a simple sample, please. :)

For what it's worth, ModalPopup automatically tries to center the control pointed to by PopupControlID. Please make sure that control (hint: an asp:Panel works well) is going to be friendly to sizing (i.e., no "width=100%" on it or children, etc.).


Here's the user control where I placed the ModalPopup. You'll note that the popup is linked with a ASP.NET menu control that is also in the same user control. Again, the control for some reason appears in the upper left corner of the screen which is in no relation to the menu control contained within this user control... Very strange. Also, as I mentioned I'm still able to interact with items on the screen behind the dialog..

<%@. Control Language="C#" AutoEventWireup="true" CodeFile="treeView_Attachments.ascx.cs" Inherits="treeView_Attachments" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %><script type="text/javascript"><!-- function addAttachment() { // declare objects var arguments = new Object(); var buttonRefresh = document.getElementById("<%=buttonRefresh.ClientID %>"); arguments.root = "<%=HelperLibrary.Web.Url.Root %>" arguments.query_ID = "<%=Helper.query_ID %>"; arguments.queryParameter_ID = "<%=Helper.queryParameter_ID %>"; arguments.pageRequested = arguments.root + "/addattachment.aspx?" + arguments.query_ID + "=" + arguments.queryParameter_ID; window.showModalDialog(arguments.root + "/source/dialog.aspx", arguments, 'status:no;dialogWidth:325px;dialogHeight:200px;help:no;'); buttonRefresh.click();// location.reload(false);// location.replace(location.pathname + location.search); } function viewAttachment(id) { // declare objects var arguments = new Object(); arguments.root = "<%=HelperLibrary.Web.Url.Root %>" arguments.query_ID = "<%=Helper.query_ID %>"; arguments.queryParameter_ID = id; window.open(arguments.root + "/viewattachment.aspx?" + arguments.query_ID + "=" + arguments.queryParameter_ID); }--></script><br /><asp:Menu ID="menu" runat="server" Orientation="Horizontal" OnMenuItemClick="menu_MenuItemClick"></asp:Menu><asp:Button ID="buttonRefresh" runat="server" Text="refresh" Style="display:none" OnClick="buttonRefresh_Click"/><hr /> <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup"> This is a test... <asp:Button ID="OkButton" runat="server" Text="OK"></asp:Button> <asp:Button ID="CancelButton" runat="server" Text="Cancel"></asp:Button> </asp:Panel> <atlasToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server"> <atlasToolkit:ModalPopupProperties TargetControlID="menu" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="OkButton" CancelControlID="CancelButton" /> </atlasToolkit:ModalPopupExtender><atlas:UpdatePanel ID="placeHolder_UpdatePanel" runat="server" Mode="Conditional"> <Triggers> <atlas:ControlEventTrigger ControlID="menu" EventName="MenuItemClick" /> <atlas:ControlEventTrigger ControlID="buttonRefresh" EventName="Click" /> </Triggers> <ContentTemplate> <asp:PlaceHolder ID="placeHolder" runat="server"></asp:PlaceHolder> </ContentTemplate></atlas:UpdatePanel><br />

I put your sample code into a new page and added the necessary supporting infrastructure to get the page running, but I'm not seeing the problem behavior you report. The page I've got seems to work fine. Here it is - please modify it as necessary to reproduce your problem and post it again so I can see what you're seeing. Thanks!

<%@. Page Language="C#" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void menu_MenuItemClick(object sender, MenuEventArgs e) { L.Text = "menu_MenuItemClick"; }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style type="text/css">.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;} </style></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="SM" runat="server"> </atlas:ScriptManager> <asp:Label ID="L" runat="server">Label</asp:Label> <asp:Menu ID="menu" runat="server" Orientation="Horizontal" OnMenuItemClick="menu_MenuItemClick"> <Items> <asp:MenuItem Text="menu item a"></asp:MenuItem> <asp:MenuItem Text="menu item b"></asp:MenuItem> </Items> </asp:Menu> <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup"> This is a test... <asp:Button ID="OkButton" runat="server" Text="OK"></asp:Button> <asp:Button ID="CancelButton" runat="server" Text="Cancel"></asp:Button> </asp:Panel> <atlasToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server"> <atlasToolkit:ModalPopupProperties TargetControlID="menu" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="OkButton" CancelControlID="CancelButton" /> </atlasToolkit:ModalPopupExtender> <atlas:UpdatePanel ID="placeHolder_UpdatePanel" runat="server" Mode="Conditional"> <Triggers> <atlas:ControlEventTrigger ControlID="menu" EventName="MenuItemClick" /> <atlas:ControlEventTrigger ControlID="buttonRefresh" EventName="Click" /> </Triggers> <ContentTemplate> <asp:PlaceHolder ID="placeHolder" runat="server"></asp:PlaceHolder> </ContentTemplate> </atlas:UpdatePanel> </div> </form></body></html>