soulflyer (1) [Avatar] Offline
The lab operations page is not working for me in Chrome or Safari. Entering the string as given on page 60 ie:


fails to hide the images. Opening the javascript console I see this error:

[Error] Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match.
(anonymous function) (lab.operations.html, line 173)
dispatch (jquery-1.11.0.min.js, line 3)
handle (jquery-1.11.0.min.js, line 3)
[Error] TypeError: 'undefined' is not a function (evaluating 'frame.perform(operation)')
(anonymous function) (lab.operations.html, line 173)
dispatch (jquery-1.11.0.min.js, line 3)
handle (jquery-1.11.0.min.js, line 3)

It does work ok in Firefox though so I will be using that for now.

Incidentally, I find these labs to be a really useful way of understanding the material. I think it works well for those of us that learn best by playing.


AurelioDeRosa (20) [Avatar] Offline
Re: Chapter3, lab.operations.html
Hello Iain.

We're aware of this issue so we've added the following note in the book:

NOTE This Lab page loads the elements on which it acts upon inside an iframe. Due to a security restrictions of some browsers, you may fail in playing with it. To avoid this issue, you can either execute the page under a web server like Apache, Tomcat, or IIS, or search a specific solution for your browser. For example, in WebKit browsers, you can run them using the flag --disable-web-security.