Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have been having a problem with "Bookmarklets" using IE9 x32 on Windows 7 Home Premium x64.

I have a rather complex bookmarklet that works on IE9 x64 but fails on IE9 x32. It also worked fine on a previous computer (XP SP3 x32) using IE6 and IE7.

I reduced it and ended up with this:

javascript:(function(){var x=window.open();x.document.write('<html><head><title>Testing</title></head><body><pre>Hello !!<br></pre></body></html>');})();


"Formatted" for easier reading, it looks like:

javascript:
(function(){
  var x=window.open();
  x.document.write('<html><head><title>Testing</title></head><body><pre>Hello !!<br></pre></body></html>');
}
)();


Putting this in a bookmark, I find that it still works on IE9 x64 and still fails on IE9 x32.

I expect that it should open a new browser window (or tab) and display the text:

Hello !!


It does so on IE9 x64, but on IE9 x32, it opens a new blank window (or tab), but does not display any text.

I had the same problem on this machine using IE8, but I have since upgraded to IE9.

I asked this question on another forum, and received some suggestions. Implementing those suggestions, I end up with this:

javascript:(function(){var x=window.open("about:blank");x.document.open();x.document.write('<!-- saved from url=(0014)about:internet -->\n<html><head><title>Testing</title></head><body><pre>Hello !!<br></pre></body></html>');x.document.close();})();


"Formatted" for easier reading, it looks like:

javascript:
(function(){
  var x=window.open("about:blank");
  x.document.open();
  x.document.write('<!-- saved from url=(0014)about:internet -->\n<html><head><title>Testing</title></head><body><pre>Hello !!<br></pre></body></html>');
  x.document.close();
}
)();


Again, this bookmark, still works on IE9 x64 and still fails (in the same way as before) on IE9 x32.

I have reviewed all the settings from Tools-->Internet Options and everything looks correct.

I have also done a reset of IE: Tools-->Internet Options-->Advanced-->Reset. This had no effect.

And, I have already tried disabling all add-ons ("C:...\iexplore.exe" -extoff). Again, no effect.

It appears that the "x.document.write(...)" is basically being ignored on IE9 x32. So, I assume that it is some sort of security setting but since it works in IE9 x64... it would seem to have to be a something that has a setting specifically for x64 and x32, I don't know where to begin.

I tried to debug this (x32) with MS Developer tools. In my First (simplest) example, the debugger always stops (break) at the x.document.write(...) statement, and the error message I have seen is "The tag is invalid.". With the debugger, there are no errors using IE9 x64.

In my Second (last) example, the debugger always stops (break) at the x.document.open statement, and the error message I have seen can be either "Access Denied" or "The tag is invalid.".

There is some "history" of my problem along with some screenshots here:
Favlet (aka Bookmarklet) failing on IE 8-ecac-

and here:
Favlet (aka Bookmarklet) failing on IE 8-af33-



I have also tried these settings:

Tools-->Internet Options-->Security-->Local Intranet-->Enable Protected Mode:unchecked
(Tools-->Internet Options-->Security-->Internet-->Enable Protected Mode:checked)


HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN:iexplore.exe=REG_DWORD 0x00000000 (0)


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0:1400=REG_DWORD 0x00000000 (0)
share|improve this question
    
What happens if you disable IE's Protected Mode? –  Karan Mar 25 '13 at 6:04
    
@Karan - I already have Protected Mode disabled: Tools-->Internet Options-->Security-->Local Intranet-->Enable Protected Mode:unchecked. (Tools-->Internet Options-->Security-->Internet-->Enable Protected Mode is enabled/checked). I don't see this setting for "My Computer". –  Kevin Fegan Mar 25 '13 at 9:03
    
@Karan - I found this article: How to Enable the My Computer Security Zone in Internet Options which allows the "My Computer" icon to be shown on Tools-->Internet Options-->Security. I tried it temporarily ... the icon is shown but it is non-functional in a sort of a "dangerous" way. So, no luck. –  Kevin Fegan Mar 25 '13 at 10:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.