2

I have a problem with the modalPopup control when I use it on IE8. The panel which is need to be popUp is already poped up.

As it suppose to look like ( in newer browsers than IE 8), there are panels in a row and when you click on one of them, a windows pops up ( using AJAX modalPopUp) list of panels Popup window

And in IE8 it shows the popUp window(panel) without even clicking on one of the panels in the list.

enter image description here

Here is the code :

<asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:panel id="PanelManufacturerPictures" runat="server" scrollbars="Auto" width="100%">
<asp:datalist id="DataListManufacturersPictures" runat="server" cellpadding="5" repeatdirection="Horizontal" repeatcolumns="11" showfooter="False" showheader="False" cellspacing="16">
<itemstyle height="75px" width="75px"/>
<itemtemplate>
    <asp:imagebutton id="ImageButtonManufacturerPicture" runat="server" alternatetext='<%# eval("manufacturername") %>' Height="100%" ImageUrl='<%# "~/elimansourwcf/manufacturerspictures/"+databinder.eval(container.dataitem, "imageurl") %>' ToolTip='<%# eval("manufacturername") %>' Width="100%" CausesValidation="False" /> <asp:roundedcornersextender id="RoundedCornersExtenderDetailsManufacturers" runat="server" targetcontrolid="PanelManufacturersDetails" radius="8" bordercolor="Red">
</asp:roundedcornersextender>
<asp:modalpopupextender id="ModalPopupExtenderManufacturerDetails" runat="server" popupcontrolid="PanelManufacturersDetails" targetcontrolid="ImageButtonManufacturerPicture" backgroundcssclass="modalBackgroundProducts" cancelcontrolid="ButtonManuCancel">
</asp:modalpopupextender>
<asp:panel id="PanelManufacturersDetails" runat="server" backcolor="White">
<div dir="rtl">
    <asp:label id="LabelManufacturerName" runat="server" font-bold="True" font-size="XX-Large"></asp:label>
    <div style="float: right;">
        <asp:table id="TableDetails" runat="server" cellpadding="15" font-bold="True" cellspacing="15">
        <asp:tablerow id="TableRow5" runat="server">
        <asp:tablecell id="TableCell8" runat="server" width="100px" horizontalalign="Left" columnspan="2">
        <asp:roundedcornersextender id="RoundedCornersExtenderDetailsManufacturerCancel" runat="server" targetcontrolid="ButtonManuCancel" radius="8">
        </asp:roundedcornersextender>
        <asp:button id="ButtonManuCancel" runat="server" text="צא מחלון זה" width="75px" causesvalidation="False" backcolor="Red" forecolor="White" font-bold="True"/>
        </asp:tablecell>
        </asp:tablerow>
        </asp:table>
    </div>
</div>
</asp:panel>
</itemtemplate>
</asp:datalist>
</asp:panel>
</contenttemplate>
</asp:updatepanel>

I saw a post:

Ajax ModalPopup wrong display in IE8 - IE9 But I didn't understand where to put the css "position: absolute;"

Here is the URL of the site:

www.emansour.co.il

Thank you for your help

[Edit] I noticed that this problem occur just when I use the modalPopup in a Bounded Data Control.

Community
  • 1
  • 1
Yogev
  • 141
  • 4
  • 14
  • I don't think they are both the same problem. I don't see how position:absolute would cause the panel to be visible on pageload. Can you share the url? or create a jsFiddle or live sample? – Hanlet Escaño Apr 17 '13 at 18:28
  • This is the url of the website : www.emansour.co.il . Try to open it with IE8 – Yogev Apr 17 '13 at 18:31
  • This is the error I am getting `Unexpected call to method or property access` and the ScriptResource.axd is causing it. Do you get the same problem in local development with IE8? Is the same version of the AjaxToolkit installed in the server as in the local server? – Hanlet Escaño Apr 17 '13 at 19:09
  • Yea, but I have no idea what is this. I don't think this problem shows in other browsers – Yogev Apr 17 '13 at 19:26
  • I noticed that this problem occur just when I use the modalPopup in a Bounded Data Control. – Yogev Apr 17 '13 at 19:44
  • I have added an answer. Check it out. – Hanlet Escaño Apr 17 '13 at 20:48

1 Answers1

2

Your error is being caused by one of the RoundedCornersExtender. For some reason, sometimes these do not play nicely nested inside numerous Panels controls and UpdatePanels. I got rid of the issue by removing the RoundedCornersExtender that is styling your buttons. Remove this RoundedCornersExtender control, and add the following css class in your code to give your button the rounded corner:

.rounded
{
    color: white;
    background-color: red;
    font-weight: bold;
    width: 75px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    border: 0px none;
}

then apply the style to your button:

<asp:Button ID="ButtonManuCancel" runat="server" Text="צא מחלון זה" Width="75px" CausesValidation="False" BackColor="Red" ForeColor="White" Font-Bold="True" CssClass="rounded" />

I left the other RoundedCornersExtender and tested on IE and was not getting the error. The AjaxToolkit can sometimes be really useful, but other times can be a real pain in the butt. If you want to add simple functionalities like these (simple css) I would reccomend against using a ControlExtension for such a simple thing. I would use Ajax.net controls for more complex stuff, or avoid it altogether.

Hanlet Escaño
  • 17,114
  • 8
  • 52
  • 75
  • Thanks dude ! You really helped me, I thought I would never get out of this problem ! So there is a problem with all the RoundedCornersExtender in my project( with IE8 of course). So I removed them all, but unfortunately the rounded css that you gave me doesn't work, the controls doesn't become rounded. Perhaps because IE8 doesn't support css 3? – Yogev Apr 17 '13 at 21:01
  • No problem. I have IE8 installed, and I see rounded corners... Might be something else? – Hanlet Escaño Apr 17 '13 at 21:03
  • 1
    Check this out if you REALLY need the borders in IE8- http://coding.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ – Hanlet Escaño Apr 17 '13 at 21:06
  • 1
    Oh, it works lol, wired. Thank you very much !! Can I ask you another question? how did you analyze the error and concluded that the problem is with the rounded corners ajax extension ? Do you have a special program for tracking this kind of errors? – Yogev Apr 17 '13 at 21:10
  • I used a step by step approach. I started once I saw your running page, to see the javascript error there, I used the Developers Tool that comes with IE. Once I saw the error was with the ScriptResource.axd, and it did not happen with Chrome and Firefox, I knew it was nothing else in your page causing the error, so I knew it was within the UpdatePanel. So after that I created the complete scenario without the things I did not necessarily need like the border. Once I saw no error I googled "RoundedCornersExtender error" etc. – Hanlet Escaño Apr 17 '13 at 21:18
  • What does ScriptResource.axd tells you? is it an Ajax extender? – Yogev Apr 17 '13 at 21:21
  • ScriptResource.axd pretty much contains all of the clientside javascript ajax is going to use (asp.net ajax that is). So if I find an error there, and no errors in the rest of the code, it is most likely your error comes from asp.net ajax :p – Hanlet Escaño Apr 17 '13 at 21:25
  • 1
    thumbs up for this one! – Crudler May 28 '14 at 08:03