Problem with ajax ModalPopup

Jul 21, 2009 at 1:06 PM

Hi guys, i'm using the MbCompression.dll and when i click to open a modalpopup, the modal screen get back to the gray screen and doesn't work.

Anyone know how to fix this?

Thanks

Thiago.

Coordinator
Jul 21, 2009 at 1:19 PM

Try using the latest code from the source code tab.

See if it is still not working

Jul 21, 2009 at 1:31 PM

Hi Miron, i've just try to using the latest code, but, still not working.

See this link with the image: http://www.sline.com.br/download/modal_error.gif

Thiago.

Coordinator
Jul 21, 2009 at 1:34 PM

Using FF + Firebug, can you see any js errors ?

Jul 21, 2009 at 1:42 PM

Miron, on the FF works fine!! I have error only on IE.

Coordinator
Jul 21, 2009 at 1:44 PM

mmm... did you clear all IE cache before switching to the latest code ?

Jul 21, 2009 at 2:12 PM

guy, now i cleared the IE Cache, and when i click on the button inside UpdatePanel, appeared an js error! =]

Sys.ScriptLoadFailedException: The script'...' failed to be loaded. Check path inaccessible.

Now, the page doesn't work, the updateprogress get "loading" infinitely.

eheheheheh

Thiago.

Coordinator
Jul 21, 2009 at 2:16 PM

Are you using 'ToolkitScriptManager' to combine/compress your ScriptResource.axd ?

Also, can you provide me you configuration of the MbCompression in your web.config ?

 

Jul 21, 2009 at 2:26 PM

Yes, i'm using

<cc1:ToolkitScriptManager ID="sm" runat="server"></cc1:ToolkitScriptManager>

My Mbcompression web.config:

<sectionGroup name="Miron.web">
    <section name="CompressorSettings" type="Miron.Web.MbCompression.SettingsConfigSection"/>
</sectionGroup>

<httpHandlers>
    <add verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler" validate="false"/>
    <add verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler" validate="false"/>
</httpHandlers>
<httpModules>
    <add name="MbCompressionModule" type="Miron.Web.MbCompression.MbCompressionModule, MbCompression"/>
</httpModules>

<Miron.web>
        <CompressorSettings reflectionAlloweded="Boolen" daysInCahe="Int" optimizeHtml="Boolen" compressCSS="Boolen" compressJavaScript="Boolen" compressPage="Boolen" compressWebResource="Boolen" compressThirdParityScripts="Boolean">
            <excludeTypes>
                <add key="" />
            </excludeTypes>
            <excludePaths>
                <add key="" />
            </excludePaths>
        </CompressorSettings>
</Miron.web>

Coordinator
Jul 21, 2009 at 2:33 PM

First, download the latest code I uploaded now (Your DLL version should be 1.0.5.3)

Second, use the following configuration:

<Miron.web>
        <CompressorSettings compressCSS="true"
                            compressJavaScript="true"
                            compressPage="true"
                            compressWebResource="true"
                            minifyContent="false"
                            cachingStorage="OutputCache"
                            autoMode="true"
                            scriptsVersion="1"
                            cssVersion="1">
        </CompressorSettings>
  </Miron.web>

Clear local browser cache and server cache.

That should solve the problem.

Jul 21, 2009 at 2:43 PM

Miron, i've downloaded the latest version and put the code in the web.config.

Cleared the cache too. The js error disappeared, but the modalpopup keep wrong yet.

I check the version of the .dll that i've downloaded, and the version is 1.0.5.3, i was using the 1.0.5.1

Sorry for disturbing you guy, but i liked this .dll and it will be nice for my project.

Thiago.

Coordinator
Jul 21, 2009 at 2:47 PM

Can you supply me an example project that I can digg into it and find the solution?

Jul 21, 2009 at 5:06 PM

i'm trying to do an example project, but in that example, its working fine. I don't know what i did wrong.

I'm using master page. See my short .aspx code bellow:

<%@ Page Language="C#" MasterPageFile="~/template.Master" AutoEventWireup="true" CodeFile="laboratoriocred.aspx.cs" Inherits="bancoresultados3.laboratoriocred" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <%--<asp:ScriptManager ID="sm" runat="server"></asp:ScriptManager>--%>
    <cc1:ToolkitScriptManager ID="sm" runat="server"></cc1:ToolkitScriptManager>
    <asp:UpdateProgress ID="updateProgress" runat="server" DynamicLayout="false">
        <ProgressTemplate>
            <div id="progressBackgroundFilter"></div>
            <div id="processMessage" align="center">
                <table>
                <tr>
                    <td><img alt="Aguarde..." src="imagens/layout/wait.gif" /></td>
                    <td><span class="label">AGUARDE...</span></td>
                </tr>
                </table>
                <br />
                <input id="Button1" type="button" value="Cancelar" onclick="cancelPostback();" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <%--<mbox:MsgBox ID="MsgBox" runat="server" />--%>
            <messagebox:SLMessageBox ID="msgbox" runat="server" />
        </ContentTemplate>  
    </asp:UpdatePanel>

<center><div class="titulo_laboratorioscredenciados"></div></center>
<br />
<div class="label">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" RenderMode="Inline">
    <ContentTemplate>
        <table>.......</table>
        <asp:panel id="Panel1" style="display:none;" runat="server" CssClass="modalPopup">
	<table>.......</table>        
        </asp:panel>
        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
            okcontrolid="" BehaviorID="mdlPopUp" TargetControlID="falseLink"
            popupcontrolid="Panel1" BackgroundCssClass="ModalPopupBG" DropShadow="false" 
            RepositionMode="RepositionOnWindowResize">
        </cc1:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>

Thnks.

Thiago

Coordinator
Jul 21, 2009 at 6:39 PM

If you can't recreate the problem yourself, how can I solve a problem that does not exists ? ;)

It must be something about cache. Clear all local browsers caches, clear server cache (Restart application) and make sure you are using 1.0.5.3 version of MbCompression.

Jul 21, 2009 at 7:55 PM

I can't recreate the sitiuation with another simple project, but on my actual project i'm getting this error.

But ok, i'll check these things you are talking about.

Thank you

THiago

Jul 22, 2009 at 1:11 PM

Hi Miron, i've found the problem. There is nothing about .dll.

Thank you for your attention.

Thiago

Coordinator
Jul 22, 2009 at 1:15 PM

So the compression is working fine ?

Jul 22, 2009 at 1:17 PM

actually, i want to solve the problem first, and after, i'll put the compression.

Thks

Thiago

Jul 22, 2009 at 4:50 PM

Miron,

Now, finally i'vw solved my problem and the compression is working, but....hehehehe

The WebResource.axd isn't compress. I don't know why. The other things are compressed!

I've already cleared the cache browser and server and i'm using ToolkitScriptManager.

Could you help me please?

Coordinator
Jul 22, 2009 at 5:10 PM

Can you pass me link to your on-line site ?

Jul 22, 2009 at 7:00 PM
Edited Jul 22, 2009 at 7:34 PM

Miron,

This application isn't on-line, only in my develop machine.

Yslow output:

Grade B on Compress components with gzip

There is 1 plain text component that should be sent compressed

  • http://localhost:5649/bancoresultados3/WebResource.axd?...

    I did everything you told me. Latest .dll, using ToolkitScriptManager and web.config like that:

    <Miron.web>
            <CompressorSettings compressCSS="true"
                                compressJavaScript="true"
                                compressPage="true"
                                compressWebResource="true"
                                minifyContent="false"
                                cachingStorage="OutputCache"
                                autoMode="true"
                                scriptsVersion="1"
                                cssVersion="1">
            </CompressorSettings>
      </Miron.web>

    Another thing, if you can help me, see the output of YSlow about CSS Minify:

    Grade C on Minify JavaScript and CSS

    There are 3 components that can be minified

  • http://localhost:5649/bancoresultados3/ScriptResource.axd?...
  • http://localhost:5649/bancoresultados3/ScriptResource.axd?...
  • http://localhost:5649/bancoresultados3/ScriptResource.axd?...

    Does the .dll acompplish this issue?

    Thank you guy.

    Thiago

  • Coordinator
    Jul 22, 2009 at 8:50 PM

    About the non compressed webresource.axd, there are some webresources that needs to perform substitution (something like WebResource inside WebResource)

    and cann't be compressed. Sometimes the Yslow don't get the compression right and you need to refresh the page so it can catch the compression.

    About your question with the ScriptResource.axd, MbCompression is not handeling such types, but if you are using the latest 'AjaxControlToolkit', the 'ToolkitScriptManager' should do the work for you.

    It will compress, combine and minify them. Ok, it will combine and minify almost all of them.

    I'm using it as the following:

    <cc1:ToolkitScriptManager ID="sm" runat="server" ScriptMode="Release" CompositeScript-ScriptMode="Release"
            LoadScriptsBeforeUI="false" CombineScripts="true">
        </cc1:ToolkitScriptManager>