TableTools and HTA

TableTools and HTA

dennismcdennismc Posts: 6Questions: 0Answers: 0
edited April 2013 in TableTools
Hello,

I have been developing an intranet application, and would like to run this in an HTA, I am due to give a demo to my client tomorrow but have just found out the TableTools is not working in the HTA.

It works fine is IE, but as soon as I run it in the HTA I get many errors and the functions to 'Save to Excel' etc do not work.

When loading the page
Line: 13
Error: Object doesn't support property or method 'clearText'

When clicking the Save to Excel button (Some of these are repeated many times)

Line: 53
Error: Unable to set value of the property 'setBomInc': object is null or undefined

Line: 53
Error: Unable to set value of the property 'setCharSet': object is null or undefined

Line: 53
Error: Unable to set value of the property 'setAction': object is null or undefined

Line: 53
Error: Unable to set value of the property 'setFileName': object is null or undefined

Line: 53
Error: Unable to set value of the property 'appendText': object is null or undefined

Line: 53
Error: Unable to set value of the property 'setText': object is null or undefined

Line: 53
Error: Unable to set value of the property 'clearText': object is null or undefined

Line: 53
Error: Unable to set value of the property 'setHandCursor': object is null or undefined

I am rather hoping there is a simple fix that would clear these errors and allow at least the 'Save to Excel' function to work

Thanks in Advance Dennis

Replies

  • krzykokrzyko Posts: 5Questions: 0Answers: 0
    Hi,
    I have exactly the same problem. I have many jquery-ui tabs (loaded with ajax) with datatables controls in them. When I am opening HTA file for the first time first tab is being loaded correctly with working TableTools. Every next datatables in loaded tab is raising an error in the line 305 in ZeroClipboard.js (this.movie.clearText();). Even if I will refresh the app the problem exists even on the first one.
    Additional thing that I have noticed is that swf file is loaded 3 times for every tab and the same number of times it initializes the TableTools.
    Have you solved this issue? Or maybe somebody else can help me?

    Regards,
    Chris
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    What is an HTA? Forgive my ignorance...

    Allan
  • krzykokrzyko Posts: 5Questions: 0Answers: 0
    HTA - HTML Application. This is Microsoft's idea which gives Web application higher security rights. It is executed like an .exe file. It allows to execute VBScripts for example to access the Windows file system.

    Chris
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Is this in the Modern UI? I thought plug-isn didn't work at all in IE in Modern UI mode - or is there an exception for Flash?

    Allan
  • krzykokrzyko Posts: 5Questions: 0Answers: 0
    This is not modern UI but in the Windows 7. We use it to open intranet application with additional previleges to open the log files directly from web UI. This is not really open by IE but as separate application (like an .exe file) in separate window with IE engine.
    As I wrote, first run works but all other tabs are not runnning correctly. Refresh (F5) is also It looks like 'this.movie' object is being resolved correctly but without the Flash methods.

    Do you know why it always downloads .swf three times and also initialising TableTools three times (3 new IDs are generated). And this behavior exists in all browsers (Chrome, Firefox and IE).

    Chris
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    > Do you know why it always downloads .swf three times

    It shouldn't! It should just use the cached version - i.e. load once and reuse. There will be three movie clips by default, so perhaps Flash is doing something a bit odd there.

    Not sure why it isn't working I'm afraid - I'd need to debug it to know more.

    Allan
  • krzykokrzyko Posts: 5Questions: 0Answers: 0
    You were right. It is downloaded once and I didn't noticed in the Chrome Dev Tool's Network tab that it uses cached. But the initialization should be done 3 times?

    Next thing I have noticed. I have tried to create a .NET Windows Forms application with WebBrowser control used. Unfortunetly the same issue. I was always thinking that this control is using IE engine which is installed in the system, but it looks like it is the same as in the HTA.

    Do you think that this can be a problem: ?
    Because: "By default, HTAs are rendered as per "standards-mode content in IE7 Standards mode and quirks mode content in IE5 (Quirks) mode", but this can be altered using X-UA-Compatible headers." [Wikipedia], and my styles without that didn't work properly.

    BR,
    Chris
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    > But the initialization should be done 3 times?

    Initialisation of TableTools 3 times? Not unless you specifically ask it to initialise three times - three tables for example.

    Possibly. If its in IE5 mode, then it doesn't stand a chance, but it works in IE7 so it should work in IE7 mode.

    Allan
  • krzykokrzyko Posts: 5Questions: 0Answers: 0
    This thing: , should force to use the newest available engine of IE.

    And yes, for every table it is initialized 3 times. Even if it is a first table on the page.
    [I used debugger to identify that.]
This discussion has been closed.