Waiter with IFrameShim

2 views
Skip to first unread message

Kevin

unread,
Oct 14, 2009, 5:27:46 PM10/14/09
to Clientcide
I'm using a Waiter with a Request.JSON and the screen underneath the
Waiter has some drop-downs (select elements). So, I want to use an
IframeShim to hide them. However, when I let the Waiter use the
IFrameShim (which is the default behavior), I get an error in IE6:
Object doesn't support this property or method, onthe following line
in the getComputedStyle function:

var computed = this.getDocument().defaultView.getComputedStyle(this,
null);

I suspected that maybe my downloaded trunk (2.1.0) was missing
something I needed, so I went back and downloaded the WHOLE library.
Then, the IFrameShim worked, but every time I loaded the JS, (i.e., on
initial load of the page) I got an error indicating that FormValidator
could not be found. I'm not using FormValidator.

Any suggestion on how to download the trunk with everythin I need to
mkae the IFrameShimi work?

Thanks.

Aaron Newton

unread,
Oct 14, 2009, 6:16:35 PM10/14/09
to clien...@googlegroups.com
I can't reproduce. This works fine for me in IE6:

Zach Gambino

unread,
Oct 15, 2009, 2:33:33 AM10/15/09
to clien...@googlegroups.com
I would double check to make sure you did indeed get the full library.
Once in awhile, when I use the builder to get the libraries, I would
be missing something. And I'm not sure why it would error if you're
not using it, but I would developer tools in IE and step through to
see exactly where it's requesting/checking the FormValidator function.

Kevin

unread,
Oct 15, 2009, 8:15:13 AM10/15/09
to Clientcide
Hmm . . . the line that was blowing up was the following line in
mootools core:

var computed = this.getDocument().defaultView.getComputedStyle
(this, null);

(in the getComputedStyle() function of Element)

I replaced that line with the following:


var doc = this.getDocument();
var view = doc.defaultView;
var computed = view.getComputedStyle(this, null);

and now I'm getting the error (Object doesn't support this property or
method) on the first line . . . is there any reason why getDocument()
would fail?

Aaron Newton

unread,
Oct 15, 2009, 11:08:35 AM10/15/09
to clien...@googlegroups.com
are you doing this in a domready statement?

Kevin Ilsen

unread,
Oct 15, 2009, 11:21:49 AM10/15/09
to clien...@googlegroups.com
I'm defining a Waiter instance on domready.  Then, on a button click, before I send a Request.JSON, I am calling myWaiter.start().  That's where it's blowing up.

I tried changing it, and instead of using my custom waiter, just using the default waiter (by calling .wait on a container element) . . . and got the same error.

Aaron Newton

unread,
Oct 15, 2009, 11:36:36 AM10/15/09
to clien...@googlegroups.com
can you post a link to this example?

Kevin Ilsen

unread,
Oct 15, 2009, 1:23:50 PM10/15/09
to clien...@googlegroups.com
It's not running on a server; I've only got it running on my local machine, and it uses servlets on the backend.  I'll try to isolate the issue in an HTML file.

Kevin Ilsen

unread,
Oct 15, 2009, 2:41:42 PM10/15/09
to clien...@googlegroups.com
Example attached.  Unzip it, view the file "MonitoredData.htm" and then click the "Get New" button.  It will error when it tries to show the waiter.
MonitoredData.zip
Reply all
Reply to author
Forward
0 new messages