Viewer problem with swfobject

27 views
Skip to first unread message

ch...@cwfent.com

unread,
Aug 23, 2013, 5:37:55 PM8/23/13
to pdfnet-w...@googlegroups.com
Hi,

We are having a problem with IE, IE 8 specifically. We get the error of:

SCRIPT87: Invalid argument.
swfobject.js, line 606 character 5


Which is the function "createCSS
" which is

dynamicStylesheet.addRule(sel, decl);

Or this if statement

                if (ua.ie && ua.win) {
                        if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
                                dynamicStylesheet.addRule(sel, decl);
                        }
                }

It looks like "sel" comes out with a element id of #65cc which would explain the failure in something like IE8 which was around when element id's had to start with a letter.

This is a good example of the same problem

https://code.google.com/p/swfobject/issues/detail?id=312

Is there something else I can do other then hack up swfobject or webviewer.js to get the element id to start with a letter to support IE8?

TIA!

Ryan - PDFNet Developer

unread,
Aug 26, 2013, 4:14:36 PM8/26/13
to pdfnet-w...@googlegroups.com
As mentioned in the swfobject issue tracker, the problem is a combination of the particular html/css and IE8. Since the swfobject project themselves consider this an IE8 issue, and we are reluctant to modify swfoject.js, as any change may affect other situations inadvertently, I'd recommend modifying the html/css source. Otherwise adding a check to swfobject.js might work in your situation.

ch...@cwfent.com

unread,
Aug 26, 2013, 5:18:13 PM8/26/13
to pdfnet-w...@googlegroups.com
I know what your saying Ryan, but its WebViewer that defining the element id of the div, not swfobject. I just changed in WebViewer.js from

me.rcId = (((1+Math.random())*0x10000)|0).toString(16).substring(1); //random id

to

me.rcId = 'aa' + (((1+Math.random())*0x10000)|0).toString(16).substring(1); //random id

Ugly hack to insure the div id starts with a letter but so far it seems to be doing the trick.

-Chris
Reply all
Reply to author
Forward
0 new messages