Javascript error in sharepoint wss3 screen

Posted by: branestawm on 8 September 2017, 7:32 pm EST

    • Post Options:
    • Link

    Posted 8 September 2017, 7:32 pm EST

    Hi. I have an ASP.NEt screen in a WSS3 sharepoint environment which contains an fpspread (spread for web v4). When the screen is launched on the sharepoint server itself everything works OK. However if you launch the screen from a browser on a separate client machine (on the same intranet), the spread appears as read-only, and as soon as the cursor passes over the spread a javascript error appears as follows:

    Line: 106

    Char: 1

    Error: Object Expected

    Code: 0

    URL: http://Sharepoint/fp_client/fpspread/4_0_2002_2008/fpspread.htc

     I have amended the web.config to set trustlevel to full and mark the farpoint dlls as safe. ANy idea what the problem is? Thanks, Jon

  • Posted 8 September 2017, 7:32 pm EST

  • Posted 8 September 2017, 7:32 pm EST

    If you right click on the page and do view source, this is the path for the fpspread.htc file?  Does it ask you if you want to download this file or give you an error if you paste this path into the browser? You put the fp_client folder on the server?

  • Posted 8 September 2017, 7:32 pm EST

    Hi. Yes - the fpclient folder is on the server. If I paste the htc url into a browser it says save or open the file - if I say open it opens OK.

    The application and the spread both work OK when I open it in a browser on the server. Its only on my client machine that I get the problem with being unable to key into the spread and the javascript error.

    Thanks, Jon

  • Posted 8 September 2017, 7:32 pm EST

    Here's some more info. This is a piece of source code taken from the page - first when rendered on my server which works, second when rendered on my desktop (not working)using the same URL. On the non-working version I notice that it refers to FpSpread1_viewport. The working version refers to FpSpread1_ctl01 . This is the only difference between the two html pages.

     Working version :

    table#ctl00_PlaceHolderMain_FpSpread1_ctl01 td.s0s0{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;background-image:url('/fp_client/fpspread/4_0_2002_2008/img/chm.png');}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s8{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s6{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s5{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_cft td.s0s9{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-color: #808080;border-left-style: Solid;border-top-width: 0px;border-top-color: #808080;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;}table#ctl00_PlaceHolderMain_FpSpread1_rh td.s0s2{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;font-size: 6pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s3{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_cht td.s0s1{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;font-size: 8pt;background-image:url('/fp_client/fpspread/4_0_2002_2008/img/chm.png');}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s7{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s4{vertical-align: Top;font-size: 8pt;}</style>

     Not working:

    table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s8{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s7{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s4{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_rh td.s0s2{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;font-size: 6pt;}table#ctl00_PlaceHolderMain_FpSpread1_cft td.s0s9{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-color: #808080;border-left-style: Solid;border-top-width: 0px;border-top-color: #808080;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s5{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_ctl01 td.s0s0{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;background-image:url('/fp_client/fpspread/4_0_2002_2008/img/chm.png');}table#ctl00_PlaceHolderMain_FpSpread1_cht td.s0s1{background-color: #d4d0c8;text-align: Center;border-left-width: 0px;border-left-style: Solid;border-top-width: 0px;border-top-style: Solid;border-right-width: 1px;border-right-color: #808080;border-right-style: Solid;border-bottom-width: 1px;border-bottom-color: #808080;border-bottom-style: Solid;font-size: 8pt;background-image:url('/fp_client/fpspread/4_0_2002_2008/img/chm.png');}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s3{vertical-align: Top;font-size: 8pt;}table#ctl00_PlaceHolderMain_FpSpread1_viewport td.s0s6{vertical-align: Top;font-size: 8pt;}</style>

     

     

     

     

  • Posted 8 September 2017, 7:32 pm EST

    Hello,

    Could you send us a small zipped project and instructions how to use the page on a SharePoint server for us to debug this issue? I have only worked with Spread in a WebPart in wss3.0 and not Spread on a web page.

  • Posted 8 September 2017, 7:32 pm EST

    Hi Scott. See attached zip. Please let me know if you need more info. Thanks, Jon

    2009/03/scott.zip

  • Posted 8 September 2017, 7:32 pm EST

    Jon,

    I was getting some errors that I had to work through, but now I am getting an error I am not sure how you got to work. Here is the error.

    Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

    How did you enable SessionState on your SharePoint web application?

  • Posted 8 September 2017, 7:32 pm EST

    Hi Scott.

    I think all I did was set enablesessionstate="true" in my page directive as follows:

    <%@ Page EnableSessionState="true" Language="VB" Inherits="strawman1.testfps" MasterPageFile="~/_layouts/application.master" %>

    That should be in the aspx page in the zip file I sent you before. There is also some bits about session state in the sharepoint web.config. I attach a zip file containing the web.config file which is from the root of my sharepoint site. Hope that helps.

    Jon

     

     

    2009/03/web.zip
  • Posted 8 September 2017, 7:32 pm EST

    Jon,

    I replaced my web.config file settings for the SessionState with the settings from your web.config file and was able to get page to run on the SharePoint server. I then copied the URL and went to another computer on the network and pasted the URL and the page ran correctly there as well. I was able to edit the Spread with no errors thrown. What else should I need to do to reproduce this issue?

  • Posted 8 September 2017, 7:32 pm EST

    Hi Scott.

     I'm a bit perplexed. There must be something different in my setup. Did you use the aspx page I sent you? How did you set up the fp_client folder on the sharepoint site? Could you send me a copy of your sharepoint root web.config please?

    Cheers, Jon

  • Posted 8 September 2017, 7:32 pm EST

    Jon,

    I went into IIS and created a new virtual directory called fp_client on the SharePoint server that pointed to the directory my fp_client files were and I set it up to enable anonymoius access. Attached is the web.config file I used for the SharePoint application. Also, I did use the aspx page you sent to me in my test and followed the directions for embeding it into SharePoint.

    2009/03/webconfig.zip
  • Posted 8 September 2017, 7:32 pm EST

    Hi Scott. I’ve got it working now - I think the main problem was that I had not set up the virtual directory on the fp_client folder, although the problem was further obscured by some sort of cacheing issue. Thanks for your help. Jon

  • Posted 14 October 2020, 6:44 am EST

    Try doing a setup of Office 2003 (amend some unimportant option). This might amend the files on your client so that they are all matching Office 2003 files.

    At the moment it seems likely that you still have a mixture of Office 2007 and 2003 files which is never good.

    (and in future don’t even think of mixing Office 2007 and 2003 apps on the same client - i.e. keep away from Outlook 2007 too until you have moved from office 2003 to 2007.)

Need extra support?

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

Learn More

Forum Channels