[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3505
  • Last Modified:

ModalPopupExtender not positioning/modal in IE7?

Hi,

I ahve the following code snippet (attached) working fine under IE6 and Firefox, under IE7 however the modal box is not modal, not centered and positioned in the top left. If I remove my reference to my stylesheet it seems to work but I need my stylesheet for some javascript that I rum (tooltip from http://ashishware.com/AJAXTT.shtml).

Please can someone suggest a course of action, I am working on a big project which all worked fine on IE6, up until we tested under IE7, only to find out that our company is moving to IE7 shortly. I will attach my aspx page, my .VB page just pops some values into the gridview.
Deleted by Vee_Mod, no points refunded:  5/18/2008 4:50:05 AM
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="FinSys.aspx.vb" Inherits="FinSys" %>
<%@ Register Assembly="Tooltip" Namespace="Tooltip" TagPrefix="cc1" %>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
	<title>ajax screwed on IE7</title>
	
</head>
<body>
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
               
            <div id="Div1" style="position:absolute; left: 254px; width: 696px; top: 198px; height: 386px; z-index: 112;">
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Style="z-index: 109;
            left: 0px; position: absolute; top: 0px" ActiveTabIndex="0" BackColor="#3966BF" Font-Names="Arial" Font-Size="8pt" Font-Strikeout="False" Height="346px" Width="687px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" CssClass="ajax__tab_yuitabview-theme" ForeColor="GradientActiveCaption">
        <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
            <ContentTemplate>
                <br />
                &nbsp;
                
                    <asp:GridView ID="grdDay" runat="server" CellPadding="4" ForeColor="#333333"
                    Style="z-index: 100; left: 8px; position: absolute; top: 88px">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                      <Columns>
                
                <asp:TemplateField HeaderText="UserName">
                    <ItemTemplate>
                    <asp:LinkButton ID="UserName" runat="server"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle ForeColor="Black" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="9-10">
                <ItemTemplate>
                 <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                  
                  <ContentTemplate>
                    <asp:LinkButton ID="lbl_9_10" runat="server"></asp:LinkButton>
                
            </ContentTemplate>
                </asp:UpdatePanel>
                    </ItemTemplate>
                
                </asp:TemplateField>
                
                          <asp:TemplateField HeaderText="10-11">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_10_11" runat="server"></asp:LinkButton>
                          </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="11-12">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_11_12" runat="server"></asp:LinkButton>
                                            </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="12-1">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_12_1" runat="server"></asp:LinkButton>
                    </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="1-2">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_1_2" runat="server"></asp:LinkButton>
                          </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="2-3">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_2_3" runat="server"></asp:LinkButton>
                          </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="3-4">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_3_4" runat="server"></asp:LinkButton>
                          </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="4-5">
                          <ItemTemplate>
                              <asp:LinkButton ID="lbl_4_5" runat="server"></asp:LinkButton>
                          </ItemTemplate>
                          </asp:TemplateField>
                
                
                </Columns>
                    <RowStyle BackColor="#EFF3FB" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                &nbsp;
                       
                 </ContentTemplate>
            <HeaderTemplate>
                Group Diary (Day)
            </HeaderTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
            <HeaderTemplate>
                Group Diary (Week)
            </HeaderTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
            <HeaderTemplate>
                Group Diary (Month)
            </HeaderTemplate>
        </ajaxToolkit:TabPanel>
        </ajaxToolkit:TabContainer>
            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
            
            <asp:Label ID="Label6" runat="server" Style="z-index: 115; left: 8px; position: absolute;
            top: 424px" Text="Job Information" Visible="False"></asp:Label>
            
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1" 
                         PopupControlID="panel2"
						 X="264" Y="230"
            CancelControlID="cmdClose"
           BackgroundCssClass="modalBackground"
           
            />
            <asp:Panel ID="Panel1" runat="server" Width="200px"></asp:Panel>
            
            
                    
                <asp:LinkButton ID="LinkButton1" runat="server" Style="z-index: 102; left: 344px;
                position: absolute; top: 472px" Visible="False">LinkButton</asp:LinkButton>
            </ContentTemplate>
            </asp:UpdatePanel>
            
            
            &nbsp; &nbsp; &nbsp;
        </div>
        
       
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
        &nbsp;&nbsp;&nbsp;
        
  <asp:Panel ID="Panel2" runat="server" CssClass="modalPopup" Style="display: none; z-index: 115; left: 264px; position: absolute; top: 216px;" Width="672px" BackColor="#C0C0FF" Height="336px">
     
      <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
          <ContentTemplate>
     <asp:Button ID="cmdUpdate" runat="server" Text="Update Job Details" OnClick="cmdUpdate_Click" />
          </ContentTemplate>
          <Triggers>
              <asp:AsyncPostBackTrigger ControlID="cmdUpdate" />
          </Triggers>
      
     
      
      
      </asp:UpdatePanel>
     <br /><br />
    <asp:TextBox ID="txtUpdate" runat="server"></asp:TextBox>
    <br /><br />
    <asp:Button ID="cmdClose" runat="server" Text="Close" />
            
     
      </asp:Panel>
              </form>
</body>
</html>

Open in new window

StyleSheet.css.txt
0
Steve_Buck
Asked:
Steve_Buck
  • 2
  • 2
1 Solution
 
Steve_BuckAuthor Commented:
Any Ideas?

Cheers All.
0
 
boro_bobCommented:
Try adding "margin: 0px auto;" into the style attribute of panel2
0
 
Steve_BuckAuthor Commented:
I fixed it!

I had some invalid elements in the CSS file which were screwing things up! I will add that tip also!

Thanks anyway!

James.
0
 
boro_bobCommented:
No problem. Glad you got it sorted. I have been using the modalPopupExtender recently, and have found styling it can be a bit of a ball ache.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now