Forums
View unanswered posts | View active topics It is currently Sun Dec 21, 2014 2:09 pm



Reply to topic  [ 23 posts ]  Go to page 1, 2, 3  Next
 Refresh/print error in IE9 
Author Message

Joined: Mon Mar 28, 2011 7:08 am
Posts: 2
Post Refresh/print error in IE9
I have downloaded and tested PIE in a Visual Studio 2010 project under IE9 using the new beta code. Here are the results:

(a) If I display a box with only rounded corners, PIE seems to work fine.

(b) I cannot refresh the page without receiving a scripting error when either the gradient or shadow is included on the box.

(c) This same scripting error occurs when I try to print a page that contains a gradient or shadow.

The scripting error is occuring on line 75, character 96, of PIE.htc, and says that "Line: 75
Error: Object doesn't support property or method 'detach'".

These same errors do not occur when attempting to use PIE.js, except then no rendering of the modified box occurs at all. It just displays as a white box with square corners. I did read that the product disables on IE9. However, this is only true when using PIE.js.

I just downloaded IE9 yesterday, so this should be the production IE9 code.

I cannot use CSS3 with IE9 currently, because the CCS3 content is rejected in the stylesheets by Visual Studio 2010.

Any ideas would be most appreciated!

Lynn


Mon Mar 28, 2011 7:22 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1448
Post Re: Refresh/print error in IE9
Thanks for the info. These issues are known and being worked on.

FYI, this problem only manifests in IE9 if you are triggering compatibility mode; using IE9 standards mode will properly exclude PIE from running. Hope that helps.


Mon Mar 28, 2011 9:03 am
Profile

Joined: Mon Mar 28, 2011 7:08 am
Posts: 2
Post Re: Refresh/print error in IE9
Jason,

I understand what you are saying. I've been playing around with this for a few minutes and have discovered a couple of unusual things.

(1) There appear to be at least two (2) separate issues. One issue when the application is being run under Visual Studio (2010?), and one issue when it is being run under Windows Server 2008.

(2) Under the Visual Studio related issue, the page display stops with the error I documented earlier regarding "Object doesn't support detach". Sometimes the page will display fine for some period of time and then, all of sudden, I will add another PIE object to the page and the problem will occur. Once it occurs, it never seems to go away. This is similar to some other types of issues within Visual Studio 2010 where it appears that certain items get "stuck" in memory and never leave until you actually delete the entire page and build a new one or some other similarly desctructive steps are taken to "force the object out" of memory. Sometimes you only have to delete a few lines of code, exit Visual Studio and then come back in and reload the project.

(3) Under the Server 2008 issue, the bottom portion of the "rounded corner object" is displayed but turned white. The object (box) will be displayed with rounded corners on upper-right and upper-left corners, but the bottom of the object will be white (and therefore generally invisible unless you display it on a background with a different color).

That's all I've discovered this morning. I need to get back to work, so will talk with you later.

Good luck!

Lynn


Wed Mar 30, 2011 10:02 am
Profile

Joined: Wed Nov 30, 2011 10:38 pm
Posts: 1
Post Re: Refresh/print error in IE9
Hello
I am having similar problems except my issues are happening before page load. I am getting all types of errors in my PIC.htc file such as:
Code:
Microsoft JScript runtime error: Unable to get value of the property 'add': object is null or undefined

This is happening when I attempt to run my application through Visual Studio 2010. I have recently installed IE9. If I go into the Compatibility View Settings under the browser's tools and add localhost I do not have this problem when I run my application but I cannot control this setting on my users' machine.

I had an older version of the PIE.htc file and just downloaded the newest beta version from this site. Is there a better, more stable version I should be useing?

Any ideas or direction would be greatly appriciated.

Thanks,
Chad


Wed Nov 30, 2011 10:52 pm
Profile

Joined: Thu Dec 01, 2011 5:14 am
Posts: 2
Post Re: Refresh/print error in IE9
Perhaps related issue:
Browser Mode: IE9 Document Mode: IE9 standards
css3pie: 1.0beta5 HTC

1. window.print();
2. print dialogue appears
3. hit print
4. JavascriptError: ln 94 offset 103 (several times)

When htc file is unminified the error is gone.


Thu Dec 01, 2011 5:21 am
Profile

Joined: Tue Dec 20, 2011 7:24 pm
Posts: 1
Post Re: Refresh/print error in IE9
I can confirm the error description of mkukik!

Btw. it doesn't have to be window.print(); any means of getting into the print dialog is sufficient.

For me using the uncompressed htc doesn't fix the problem.

In the end I modified the cleanup method (of beta5) as follows, to stop the error from appearing.

Code:
function cleanup() {
  try {
    var PIE = window[ 'PIE' ];
    if (PIE) {
        PIE['detach']( el );
        PIE = el = 0;
    }
  } catch (e) {}
}


Tue Dec 20, 2011 7:27 pm
Profile

Joined: Thu Dec 01, 2011 5:14 am
Posts: 2
Post Re: Refresh/print error in IE9
Just to clarify. By unminified I meant reformatting of compressed htc file using Notepad++ and JSMin plugin.
Good to hear it has been fixed. Thanks


Thu Dec 22, 2011 1:52 am
Profile

Joined: Fri Aug 19, 2011 2:31 am
Posts: 8
Location: The Netherlands
Post Re: Refresh/print error in IE9
Could this try ... catch code solve an IE9 script error (Unspecified error) in (minified) PIE-1.0beta5/PIE.min.htc at line 94 and character 103?


Tue Jan 03, 2012 7:14 am
Profile WWW

Joined: Fri Jan 13, 2012 4:07 am
Posts: 1
Post Re: Refresh/print error in IE9
Thanks ampaze, that worked for me! :)


Fri Jan 13, 2012 4:09 am
Profile

Joined: Sun Jan 29, 2012 3:38 pm
Posts: 1
Post Re: Refresh/print error in IE9
Just fixed CSS3-PIE (and html5shiv/iepp) related print issues in IE8 (where browser crashed on javascript print) by using document.execCommand('Print') instead of window.print() when IE less than 9 — still use window.print() in all other browsers. We found out this fix because we discovered printing and print-previewing pages through IE browser native buttons or ctrl+p was fine, but not when using javascript and window.print() — so we had to emulate the working scenario, the browsers standard native print-functionality.
One thought that comes in mind is that the onbeforeprint and onafterprint event callback-methods order is of great importance, lets say PIE-callbacks is called after html5shiv:s/iepp:s corresponding callback-methods — so the result is browser crash due to CSS3-PIE and html5shiv/iepp incompability issues — haven't tested the corresponding css and using PIE without html5 and html5shiv/iepp, that could show a CSS3-PIE issue only, but that's not my first guess — I trust you guys have tested IE8-9 print with PIE since you implemented the callbacks of onbeforeprint- and onafterprint-callbacks.

However, when we now fixed the IE8 javascript-related print issues we now run into a IE9 print issue, whatever way of trying to print it isn't working.
But our error message is referring to the first row in the cleanup-method (using uncompressed version) — so, despite it seems to be a different error message than the other issue in this thread this try-catch wrapping in the cleanup-method seems the correct fix for us too...

So, I guess we all are waiting for a fixed version where IE9-users is able to print on our PIE.htc-sites...
And I suggest investigation of the possibility to build an override of window.print() and call document.execCommand('Print') on IE<9 into PIE.htc, so people building modern websites and using html5shiv(or iepp), selectivzr and PIE.htc don't have to run into this issue and need to fix it at their sides. That's just an idea, but what should be done right now is to confirm this issue and then put it into known issues section to spread the knowledge.

Update:
Updated the first paragraph with a thought that there might be a incompability issue between html5shiv/iepp and css3-pie and that is the way these libraries handles onbeforeprint- and onafterprint-event callbacks. So my suggestion of overriding window.print in comment above is a no issue if there is a compability issue between html5shiv/iepp and css3-pie and that issue is getting resolved — putting it all together: in my mind all our print issues is pointing into the direction that html5shiv/iepp and css3-pie can't co-exist in a functional manner for now, without having to do ugly workarounds.

And for the compability-mode issue comment up above in this thread, we do set one compability mode:
Code:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
in >IE7 to handle an EPiServer issue, where EPiServer force IE7 compability mode in cms-edit-mode in an outer frame, so our inner frame we force a more modern. In none-cms-mode (no surrounding iframes etc.) setting this edge,chrome=1 compability should not be any worse than not setting a compability mode, it rather forces the most modern version the browser provides...



In the waiting we will try this try-catch-fix!!! (...and it works...)


Sun Jan 29, 2012 3:57 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 23 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.