CSS3 PIE Forums
http://css3pie.com/forum/

'element is undefined'
http://css3pie.com/forum/viewtopic.php?f=3&t=228
Page 1 of 1

Author:  mattyturner [ Fri Oct 29, 2010 12:11 am ]
Post subject:  'element is undefined'

So, I am trying to get PIE up and running on a simple site.

I have pared it down to only use PIE in my main style sheet (IE specific served by conditional comment is all commented out).

I am only attempting to fix one thing, a linear gradient background.

URL: http://ciaudio.perfectfifth.net/

I am seeing the error in the IE developer toolbar console:
'element' is undefined PIE.htc, line 20 character 114

I'm calling PIE on line 156 of my CSS.

Any ideas or suggestions greatly appreciated.

Author:  jason [ Fri Oct 29, 2010 6:32 pm ]
Post subject:  Re: 'element is undefined'

That's strange, I don't see that error when loading your page. However if I try to go to /javascripts/PIE.htc directly, then I see the error. This is because PIE.htc is being served as text/html, so IE thinks it's an HTML document and tries to execute its script content, which fails due to the differences between HTC and normal JS scopes.

At the very least you need to make your server send the correct content-type; see the Known Issues documentation page for details.

Author:  mattyturner [ Sat Oct 30, 2010 12:56 pm ]
Post subject:  Re: 'element is undefined'

Okay.. perhaps that is a red herring then.
I fixed how it is being served.

I'm using it on another project (which I can't link to unfortunately) and it's being served as regular text and it's working fine. I can't figure out what is different in this scenario.

I have tried changing the paths etc but nothing seems to want to work.

Author:  jason [ Sat Oct 30, 2010 4:08 pm ]
Post subject:  Re: 'element is undefined'

Well I hate to say it but I'm stumped. I've loaded your site while using Fiddler to log the HTTP traffic, and for some reason IE is not even trying to make any request whatsoever for the htc file. It's as if it's ignoring the behavior property altogether, even though it's clearly there! I have no idea why it would be doing this, and web searches for this issue have turned up nothing yet.

To make it even more bizarre, I've pulled down a copy of your HTML/CSS/etc. to a local server, adjusting paths as necessary, and it works just fine from there!

Hmmmm... :|

Author:  mattyturner [ Sat Oct 30, 2010 4:15 pm ]
Post subject:  Re: 'element is undefined'

I appreciate your effort on my behalf.. time for plan B I think.

Author:  jason1987 [ Thu Nov 15, 2012 5:07 am ]
Post subject:  Re: 'element is undefined'

Hi,

did you ever manage to solve this one? I am having the exact same problem but only with IE7 and IE6 it works in IE8

Thanks
Jason

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/