Can't get JQuery postMessage plugin to work on IE - javascript

I'm trying to use this jQuery postMessage plugin to pass messages between a couple of windows. While it's working great under FF/Chrome, it just doesn't seem to work under IE8 nor IE9.
The line I'm using is:
$.postMessage('hello world', opener.location.toString(), opener);
In IE8, I get the following error message:
No such interface supported
jquery.ba-postmessage.js
Code: 0
line: 112
char: 7
I can't really figure out what I'm doing wrong. I noticed this library is a bit outdated (though it does say to be working on IE8), so I tried downloading jquery-1.3.2 which it is said to be working on, and it still didn't work.
Any tips about how to solve this (or possibly any references to other cross-browser libraries with the same ability) will be much appreciated.

This appears to be a limitation of Internet Explorer. postMessage will only work between frames of the same page, not between windows or tabs.
For more information, see:
http://blogs.msdn.com/b/thebeebs/archive/2011/12/21/postmessage-popups-and-ie.aspx
http://blogs.msdn.com/b/ieinternals/archive/2009/09/16/bugs-in-ie8-support-for-html5-postmessage-sessionstorage-and-localstorage.aspx (Issue #1)

Related

AngularJS in Internet Explorer 7

Yes, I know, IE 7 is dated and does not support modern technology. **Insert classic Microsoft joke**
However I work for a state University and there is a lot of red tape so for the time being we still partially support IE7 (hopefully that won't be the case soon). Also, I'm really curious about this issue.
I have read through Angular's documentation for supporting old versions of IE and for the most part I can get things to work. But oddly enough, a simple Angular application crashes on IE7 if you populate two attributes with data bound content in the same HTML tag.
For instance if I am looping (ng-repeat) through an object to create a link list, this works just fine:
Google
But this does not work:
Google
In fact it crashes the whole application. Any thoughts?
Here is a working Plunkr http://plnkr.co/edit/znbXJkhiEQXqhTcyYcU4?p=preview just so you can preview some sample code. When I run that code on a static .html page in an IE 7 browser emulator (browserstack.com), nothing shows, not even the "Hello World". Just the Angular templating brackets.
Please let me know if you need more information. Thanks.

Firefox warning message

I have a weird issue with firebug with my current javascript code
I have a web page with javascript and jQuery and I get this message:
use of getattributenodens is deprecated. use getattributens instead
I use jQuery 1.5.2 and Firefox 8, I get this error also on Windows 7 and XP. I tried mac also
I don't use getattributenodens in my code,
Who can fix this error? Thanks
Its just a warning, so developers can update their code with plenty of time.
You are a fair few versions behind in jQuery. If you upgrade to the current version (1.7.1), I think you will find this error message no longer exists.
Visit jQuery Website - http://www.jquery.com
Direct link to newest version — http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

Spine.js IE6 Support

So I've been looking at Spine.js recently as an alternative to Backbone. However, in the documentation is states:
Works in all major browsers (Chrome, Safari, Firefox, IE >= 7)
then in the comments on this page some one says:
Spine doesn't seem to run in IE6 or IE7... Maybe even other Internet
Explorers. Shouldn't this be pointed out? Backbone runs fine with
these. Am I just missing something?
reply:
Maybe because of json? "If you're using an older browser which doesn't
have native JSON support (i.e. IE 7), you'll need to include json2.js
which adds legacy support." (from the docs)
This is literally ALL the information i could find on the subject. Does anyone know if ie6 is at all supported? If not I'm afraid I will not be able to use it...
I can confirm that spine.js works on IE7 - we don't have IE6 as a requirement nor any IE6 tests machines, so I can't comment on IE6 support.
I would suggest running a quick test, using it takes under an hour to get a simple app running that you can verify things on.

Firefox XUL toolbar with javascript to IE?

I have developed a Firefox toolbar in XUL, which uses javascript to manipulate the DOM.
I'd like to export this to IE.
I know that IE doesn't support XUL, but wonder:
(1) is there an easy way to use the existing javascript code for the IE toolbar as well?
(2) is there a IE installer that easily creates all necessary registry values for creating a toolbar?
I'd be grateful for any help. If anyone can point me to a sample IE toolbar code, with several buttons, drop-down menus and perhaps even a search box, that'll make things much easier as well.
Thanks!
Try AmpleSDK by using this you may port your toolbar to ie
Writing an IE toolbar requires C++, the Windows API and Microsoft COM. If you have the paid version of Visual Studio then you can also use ATL to simplify some of the work.
You won't be able to re-use your JavaScript code. Unless perhaps JavaScript code for manipulating the DOM of the currently loaded webpage.
This article is what got me started:
http://msdn.microsoft.com/en-us/library/bb776819.aspx
I found this to be a helpful sample.
I want to warn you though that creating an IE toolbar can be quite painful. If you are serious then I recommend that you learn and understand the basics of COM and ActiveX first. (I did not do this and spent many hours messing around getting nowhere.)
An alternative option would to embed XULRunner in IE. It would allow you to port most of your code. I have never tried this myself though.
Well the company www.softomate.com is focused on porting existing FF plugins to IE and other browsers. We were able to port my existing Security related plugin to IE and Safari with them.

ie8 javascript not running or loading

I have un-installed and re-installed IE8 a few time and javascript will not run.
I have checked jQuery and numerous sites, and run simple examples like alert("hi"); nothing works. The ie8 developer tools under script debugging says
"Breakpoint cannot be set in this location, the code in the document is not loaded"
This also happens when using the Spoon plugin and IE7 Or IE8.
also any of these scripts work just fine in firefox.
Any ideas or help is much appreciated!
Go to Internet Options, Security, Custom Level, and enable Active Scripting under Scripting.
OS: WinXp service pack2
issue in IE7 and IE8
I had spent alot of time today, uninstalling and reinstalling IE v 7 & 8. I had checked the security settings multiple times. Even disabled my firewall, nothing worked. eventually a friend of mine found the clue.
Apparently IE7 & IE8 use the same javascript registered DLL which had become un-registered for whatever reason.
To fix it:
Start > Run...
In the Run box, type in (without quotes) "regsvr32 jscript.dll"
You should receive a popup says that it registration succeeded.
I had the same problem, but the issue for me was the way I defined my block of script. I used type="application/javascript". This is supposed to be the correct way to do it, but IE only wants text/javascript.
IE -> Tools -> Internet Options -> Advanced -> Disable script debugging (uncheck)
ensure tag ends with > instead of />
None of the above worked for me,
Reserved keyword
It was blocked because I tried to invoke my custom export function from my custom object. The 'export' keyword seemed to be reserved in IE.
Chrome works fine comme toujours.
In my case the problem was that IE8, doesn't support Object.defineProperty, which lead to all JavaScript not working.
I found out about that problem, when I started debugging JavaScript in IE8 and got the error Object doesn't support this action.
This helped me, apparently IE doesn't always load script when running from local drive. I had to add a "Mark of the Web".
<!DOCTYPE html>
<!-- saved from url=(0021)http://www.google.com -->
<html>
for my case which was in IE11 in windows server 2008 R2
at first my site was recognized as internet zone which IE Security Level bar was configured high and not normal.
but adding my site simply to Trusted Sites which have low security via Internet options - Security tab - resolved the problem.
Looks like there can be multiple causes for the same symptom. For me it turned out to be the ActiveX controls/active content was blocked (I'm developing on local and had forgotten that IE likes to make things nice and secure from local).
Side note: With IE9 (I just upgraded) they moved the 'yellow bar' to the bottom and I was failing to notice it. MS is missing more than hitting lately on their UX/UI design
(see for example the ribbon interface visual overload http://www.appleinsider.com/articles/10/03/29/new_office_11_for_mac_sports_dense_ribbons_of_buttons.html)
I tried
regsvr32 jscript.dll, but it didn't work.
Then I tried
regsvr32 C:\Windows\System32\jscript.dll
regsvr32 C:\Windows\SysWOW64\jscript.dll
And it works!
In my case, the JavaScript key const lead to an error that stop JavaScript execution. The key word is not support in the IE 10(and early version). See this for more infomation.

Categories

Resources