Skip to content Skip to sidebar Skip to footer

How To Call A Javascript Function From One Frame To Another In Chrome/webkit With File Protocol

I have developed an application that has a list of items in one frame; when one clicks on an item it does something in another frame (loads an image). This used to work fine in all

Solution 1:

See the answers to the closely-related question: Call a JavaScript function defined in an iframe in Chrome using the file protocol.

Briefly, launching Chrome with --allow-file-access-from-files "solves" the problem insofar as the error will not be reported.

Of course, since you're distributing files on a CD, you're unlikely to view this an actual solution. I recommend starring Chromium bug 47416 to encourage the developers of Chromium to bring Chrome more into line with the behavior of Gecko.

Solution 2:

I tried your test pages, and they work fine with Chrome 4.1.249.1045 on Windows (and Firefox 3.6.3, and IE7 [after fixing the issue below]). So I'm with Pekka (as usual): I think the problem must lie elsewhere.

It wasn't working in IE7 and it took me forever to figure out why not: You need to give either rows or cols on the frameset tag, otherwise IE only loads the one frame. (The validator would have told me that if I'd asked it.)

Post a Comment for "How To Call A Javascript Function From One Frame To Another In Chrome/webkit With File Protocol"