Javascript errors on asp.net production

Originally Posted 26 June 2014, 7:24 am EST

  • Originally Posted 26 June 2014, 7:24 am EST

    Hello ComponentOne Team,

    I'm writing this topic because lately we are receiving a lot of errors of our asp.net production server with javascripts error, pointing to some of your "htc" and "js" files. I don't know why we are getting this errors, so i need your help to correct this problem.
    These are the errors we are having:

    1.-

    msg: 'fpSpreadJS' is null or not an object
    url: /fp_client/fpspread/6_0_3501_2008/htc/fpspreadie8.htc
    line: 136

    2.-

    msg: TypeError: document.defaultView.getComputedStyle(...) is null
    url: /fp_client/fpspread/6_0_3501_2008/htc/fpspread.js
    line: 5

    Seems like that the error ocurrs after calling the ScrollTo function.
    Thanks in advance,

    Regards,
    Fernando Sepúlveda
  • Reply

    Hello Fernando,

    It seems that fp_client folder was not deployed correctly. Kindly refer to the following link describing the same:
    http://helpcentral.componentone.com/NetHelp/SpreadNet7/ASP2/webframe.html#spweb-startredist.html

    Regards
  • Reply

    Hello Fernando ,

    Does these errors occur in any specific browser ?
    This is because the HTC (Html Component) approach is just applied for IE8 (and before) only.

    Regards
  • Reply

    Hi again Ashish,

    Yes, these errors ocurred only on IE8 browser, i didn't saw it on Chrome or Firefox.

    Regards,
    Fernando Sepulveda
  • Reply

    Hello Fernando,

    I tried to use ScrollTo method with latest version of Spread 7 and it works correctly in IE8. Could you kindly try with the latest version since we no longer provide bug fixes or new features in Spread 6 ?

    The latest version is available at this link:
    http://www.componentone.com/SuperProducts/SpreadStudio/

    You can also try with the last release version of Spread i.e.
    http://sphelp.grapecity.com/2013/07/30/spread-net-6-final-service-pack-released/

    Regards
  • Reply

    Dear Ashish,

    I'm using Spread 6_0_3501_2008. As i tested, those errors doesn't ocurrs everytime, making me difficult to detect. In fact, the last 2 days i haven't received any errors from production. It could be a temporary problem with the server (overload, internet problem) or with the client?
    I will give a try to the lastest Spread 6 release anyway.

    Thanks!

    Regards,
    Fernando Sepúlveda
  • Reply

    Hello Fernando ,

    It might be client specific as it does occur every client or at regular intervals. However, you can try with latest version and let me kn0w your observations.

    Regards
  • Reply

    Hi Ashish,

    I guess it's not that the problem, because these errors doesn't ocurr everytime i call a web site with the Spread.
    The fp_client folder is in the wwwroot directory, and if i change the web.config, i got always a reference error to the files.

    Regards,
    Fernando Sepulveda
  • Reply

    Hi Ashish,

    After a lot of tests, i detected the problem. Here are my observations:

    When i load my aspx page, i'm adding a LiteralControl on it, with a javascript instruction that is in another javascript file.
    The javascript instruction paints the background cell of the active cell in the spread.
    The problem ocurrs in Internet Explorer, because the spread functions aren't available at that point. I saw in Chrome it not ocurrs because before the call of my function the aspx calls the function "the_fpSpread.Init(document.getElementById('fps'))", but in Internet Explorer i didn't see it.
    I have added a sample project, wishing to receive your comments, because maybe i'm doing something wrong or even it could be better the call of my function
    Thanks in advance.

    Regards,
    Fernando Sepulveda
    2014/07/WebApplication2.zip
  • Reply

    Hello Fernando,

    I tried to run the given sample but it does not load and gives an exception that " Unable to set property 'GetFilaActiva' of undefined or null reference". It seems that it is unable to find functions created in the js file. Could you kindly recheck the sample so that I can check the issue at my end ?

    Also, could you kindly try the same with the latest version of Spread 7 or Spread 6 ?

    Regards
  • Reply

    Dear Ashish,

    What browser are you using? I tested the sample and in Chrome 35 works perfectly, but in Internet Explorer 9 it gives me error when i click the "Button" button, saying "the object doesn't accept the property or method GetActiveRow", because as i said, the "the_fpSpread.Init(document.getElementById('fps’))" is not being writed on the generated html (therefore GetActiveRow isn't loaded yet).
    I can't test the application with other version of spread, i'm not authorized to change the version and build that we are current using.
    Thanks in advance.

    Regards,
    Fernando Sepulveda.
  • Reply

    Hello,

    I would suggest you to use ActiveRow property instead of the GetActiveRow method. It should work fine in IE9.




    Thanks,
    Deepak Sharma
  • Reply

    Hi DeepakSharma14,

    ActiveRow works also in Chrome, Firefox and Opera? i have readed that ActiveRow is only for Explorer and in javascript we are validating the ActiveRow function. Also, we support that 4 browsers and if one doesn't work, it's not a solution for us.
    Here the problem is when i'm adding a javascript code at the end of the page, not a particular function like ActiveRow.
    Thanks in advance.

    Regards,
    Fernando Sepúlveda
  • Reply

    Hello,

    I am not able to get your sample application running. Hence I have attached a sample application that I used at my end to test this issue. Please go through it and let me know if you are able to replicate the issue with this. I would suggest you to please download the latest build of Spread 6 from here(which I used):
    http://download.componentone.com/pub/SpreadNet6/spreadnetfullinstall.zip
    2014/07/SpreadActiveRow.zip
  • Reply

    Hi Deepak,

    I guess you are not understanding my problem.
    I have a javascript error calling a javascript spread function(spread.ActiveRow or spread.GetActiveRow()) from a .net code, adding it as a literalControl or using ClientScript.RegisterStartupScript to the html page. If i do the same without a postback, i don't have the problem (like your sample). I only want to add a javascript function on my html page after any .net validation. Maybe my method of adding javascript from .net is wrong, but i don't know another method that works fine in every browser (that's why i mention that in chrome i don't have the problem but i do have the problem in internet explorer).
    I said i'm not able to use other build of the spread.
    Thanks in advance.

    Regards,
    Fernando Sepúlveda.
  • Reply

    Hello,

    It looks an issue to me. Here the RegisterStartupScript seems not be working properly for ActiveRow or any other client side property. I will forward it to the concerned team for further investigation.
    I will let you know as soon as I get an update on this.

    Thanks,
    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels