blueimp/JavaScript-Templates

IE7 & IE8 Invalid procedure call or argument

Closed this issue · 2 comments

I hate to bring this kind of "bugs", but I get this "invalid procedure call or argument" when using IE7 and IE8 and it stops all further javascript execution, right here:
tmpl.js, line 35 character 9

tmpl.load = function (id) {
        return document.getElementById(id).innerHTML; <--
};

Using

  • tmpl.js v 2.1.0
  • jquery 1.8.2
  • jquery-ui 1.9.0
  • jquery.fileupload 5.19.3

Can you reproduce this problem on the demo?
Sorry, but I couldn't reproduce any problems with any IE version (tested IE6 to IE10).

The JavaScript Templates script doesn't have any dependencies, so I doubt it is related to any of the included libraries.
It's also used by the File Upload demo and I cannot reproduce any such issue there either.

I'm closing this issue for now, feel free to report back if you can definitely pinpoint this issue to a bug in the JavaScript Templates script.

In-case anyone else stumbles on this thread:

I was experiencing the same issue - eventually I found that it was due to it not finding the upload-template so it was passing undefined to the getElementbyId method.

In my case the upload-template was contained in a section of the page that was initially hidden from view by a knockout 'with' binding. IE 8 does not find the template on load when it is hidden in this way. I fixed it by moving the template definition outside of the hidden section.