[CLOSED] java script error

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] java script error

    Hi

    I have a panel with an Iframe on my page. The url is set in code behind.
    This produces a javascript error. Any idea what i can do against it?

    the markeup:
    <ext:Panel ID="PanelDocumentPreview" runat="server" Title="<%$ Resources:CUSTRocheImport, DocumentPreview %>"
                    Height="400" MinHeight="200" Width="520" Flex="1" Margins="0 5 0 0">
                    <Loader ID="Loader1" Url="" Mode="Frame" ShowMask="true" runat="server" />
                </ext:Panel>
    Last edited by Daniil; May 13, 2013 at 2:22 PM. Reason: [CLOSED]
  2. #2
    Hi @elke.schreiber,

    Quote Originally Posted by elke.schreiber View Post
    The url is set in code behind.
    At which moment?

    You might need to set up AutoLoad="false" for the Loader.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @elke.schreiber,



    At which moment?

    You might need to set up AutoLoad="false" for the Loader.

    thanks that helps.

    But I have an a addition problem with the Iframe.
    Sometimes I get following error.

    Unhandled exception at line 2251, column 13 in http://localhost/CUST.Roche.Import.V...xt.axd?v=40838
    0x8000ffff - Microsoft JScript runtime error: Invalid calling object

    It happens in the function and on the page i get "false".

    I get the error since we have changed to ext.net 2.2 before it worked well.


    Any idee?



     loadFrame: function (options) {
    .....
    
     else {
                target.iframe.dom.src = Ext.String.format("java{0}", "script:false");
                window.frames[target.iframe.dom.name].location.replace(url);
                this.beforeIFrameLoad(options);
            }....
  4. #4
    Could you, please, provide a test case to reproduce the error?
  5. #5
    Quote Originally Posted by Daniil View Post
    Could you, please, provide a test case to reproduce the error?
    this error happens on a complex page with many business functionality and data from a complex database structure.

    Please try to help me without an example.
    Can you tell me what you know about this error?

    Thanks
  6. #6
    this error happens on a complex page with many business functionality and data from a complex database structure.
    We don't need business functionality, you have to remove any code unrelated with the issue
    Is the issue reproducible in simple page?
    Is the issue reproducible if the loader has any initial url (just I noticed that your loader has empty url)?
  7. #7
    Quote Originally Posted by Vladimir View Post
    We don't need business functionality, you have to remove any code unrelated with the issue
    Is the issue reproducible in simple page?
    Is the issue reproducible if the loader has any initial url (just I noticed that your loader has empty url)?

    Hi

    I have tried to reproduce the error that I have since Version 2.2


    Startpage:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestLoad.aspx.cs" Inherits="WebCsharp.TestLoad" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
    
        [Ext.Net.DirectMethod()]
        protected void cmdLoad(object sender, EventArgs e)
        {
            Panel1.LoadContent("/Document.aspx");
        }
    
        [Ext.Net.DirectMethod()]
        protected void cmdReset(object sender, EventArgs e)
        {
    
            Panel1.LoadContent("/LoadUsercontrol.aspx");
        }
    
    </script>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <div>
            <ext:Panel ID="test" runat="server">
    
         <Buttons>
                    <ext:Button ID="Button1" runat="server" Text="Load">
                        <DirectEvents>
                            <Click OnEvent="cmdLoad">
                               <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="Button2" runat="server" Text="Reset">
                        <DirectEvents>
                            <Click OnEvent="cmdReset">
                               <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
             </Buttons>
                         <Items>
                             <ext:Panel ID="Panel1" runat="server"
                            Height="400" MinHeight="200" Width="520" Flex="1" Margins="0 5 0 0">
                            <Loader ID="Loader2" Url="" Mode="Frame" ShowMask="true" runat="server" AutoLoad="false" />
                        </ext:Panel>
    
    
             </Items>
             </ext:Panel>
        </div>
        </form>
    </body>
    </html>
    The Document.aspx --> the pdf is not special
    LoadUsercontrol.aspx --> nothing specal

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Document.aspx.cs" Inherits="WebCsharp.Document" %>
    
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            byte[] content = System.IO.File.ReadAllBytes(@"C:\Test.pdf");
          
    		Response.BinaryWrite(content);
    		Response.End();
        }
    </script>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    hope you will find the error
  8. #8
    Thank you for a test case.

    It looks we are facing the same issue as here.
    http://www.digiblog.de/2011/08/ie9-b...ng-javascript/

    We committed the change to SVN. Please update and retest.
  9. #9
    Quote Originally Posted by Daniil View Post
    Thank you for a test case.

    It looks we are facing the same issue as here.
    http://www.digiblog.de/2011/08/ie9-b...ng-javascript/

    We committed the change to SVN. Please update and retest.

    Thanks, we will test it.
    But what I can say is that it also happens in Firefox.
  10. #10
    I can't reproduce it with FireFox. By the way, FireFox doesn't show a pdf correctly for me, it shows some "abracadabra". The same in Chrome.

    How is it going for you?
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: Jun 15, 2012, 11:49 AM
  2. change HyperLink NavigateUrl by Java Script
    By BLOZZY in forum 1.x Help
    Replies: 2
    Last Post: Aug 09, 2011, 11:32 AM
  3. [CLOSED] [1.0] Java Script broken under IE
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2010, 4:46 PM
  4. How to Expand the collapsed panel from java script
    By ajaybabu.maddinani in forum 1.x Help
    Replies: 4
    Last Post: Mar 12, 2010, 2:42 AM
  5. Replies: 2
    Last Post: Jul 29, 2009, 1:57 PM

Posting Permissions