The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex
We should be linking to the actual sources of info, rather than just the top google hit.
ReplyDeletehttp://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words
JSscript 8.0:
http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx
I'll look for ECMAScript links later.
This is one of the many things discussed in "JavaScript: The Good Parts" by Douglas Crockford.
ReplyDeleteBy the way, I'm not affiliated with the publisher; The book is just that awesome.
I discovered today that the word "keywords" is a reserved word in IE javascript. It turns out to be an object that contains a list of all the keywords. No errors are generated if you try and use this as a variable, but any time you try and access the value of your variable you get an object back instead of what you assigned to it. Arg!
ReplyDeleteheader and footer just broke my script in IE8.
ReplyDelete