IE7 context menu options for javascript links - javascript

In IE8, Safari, Chrome and Firefox if I right-click on the link the new tab and new window options are disabled. Right-clicking the link in IE7 still has these two options enabled. Is there any way to disabled these options in IE7 for javascript links?
Sample Code:
<html>
<body>
Javascript link
</body>
</html>

This does not have anything to do with the HTML, but the browser. I am 99.9% sure you can't change it, it's hardcoded in IE7 by Microsoft. Submit a bug to Microsoft, but they'll probably say "We no longer support IE7, nor do we give a crap about your problems." (Maybe not exactly like that :) ).
So, this is not a programming question, it's a software question, hence why you got downvoted (I didn't do it, but that's my assumption).

Related

window.opener is null... didn't use to be

In our software, we have a page with a link that opens a page within the same site in a new tab using target='_blank'. When the user is done working on that newly opened page, they click a button and when the page refreshes, it calls the following code.
window.opener.location.href = window.opener.location.href; window.close();
This has worked fine for ages but within the last week or so stopped working in all browsers. I can't seem to find anything when I google it about a new security restriction being implemented that would cause this. Any idea what's going on and how to get it working again? I've tested the following code in chrome, firefox, edge and IE11. In all but IE11 window.opener is null. In IE it is not. Is there possibly a new security setting in browsers that would cause this?
<html>
<body>
click me
</body>
</html>
<html>
<body>
<script>
alert(window.opener === null);
</script>
</body>
</html>
I am not sure which version of chrome browser you tested your code on. To avoid "tab-napping" attacks, many browsers have started implementing noopener behavior by default for anchors that target _blank.
Chrome enabled noopener behavior in release 88.
Safari also enabled this in release 68.
I couldn't find any reference to IE 11 change. But it's worth trying adding rel="opener" in anchor tags with target=_blank

JS Bookmarklet Not Working in IE11

long time lurker, first time poster.
The basics are this:
Inspired by this blog post, I'm attempting to create a bookmarklet for our QA team to quickly populate a form.
The bookmarklet works perfectly on my machine (TM) in Chrome, IE 10, and IE 9 compatibility mode. I've tested the bookmarklet on the QA team's machines, and while it works fine on their Chrome browsers and on IE 9, the bookmarklet doesn't work on the two machines running IE 11.
Details:
Of the two machines running IE 11, one is on Win 7, the other is on Win 8.1. The machine running IE 11 on Win 7 is updated to IE version 11.0.9600.17207IS, and will also run the bookmarklet correctly in Chrome.
I've attempted a couple different variations, the first based on the CSS-Tricks blog post mentioned above.
<a href="javascript:
(function(d) {
var body = d.getElementsByTagName('body').item(0);
var script = d.createElement('script');
script.src = 'https://company.siteurl.com/unrelated/DisclosureRegister.js';
body.appendChild(script);
}(window.document));
alert('Bookmarklet js fired!');">Disclosure Register Bookmarklet</a>
The second, based on a StackOverflow Response, is as follows:
<a href="javascript:
(function(){
var s=document.createElement('script');
s.type='text/javascript';
s.src='https://company.siteurl.com/unrelated/DisclosureRegister.js';
document.getElementsByTagName('head')[0].appendChild(s);
}());">Disclosure Register 2</a>
Both codes work on my machine in the previously mentioned browsers, neither work in IE 11 on the other machines (I don't have IE 11, can't test it directly on my machine).
I get no error message in console in the developer tools, and the DisclosureRegister.js file isn't listed in the developer tools' file list. It appears that the bookmarklet simply isn't firing.
Neither one of those bookmarklets have a Web Documents tab when I right click > properties, however, a simple javascript alert bookmarklet I provided them with does have the Web Documents tab, and it works perfectly in all browsers (including IE 11).
Click me!
I'm delivering the bookmarklets by writing the html in Codepen, emailing them a direct link to the Codepen (I don't have enough reputation points to post the link), and having them drag the link from the Codepen output to their browser favorites bar.
I came across something that gave me hope it was a bug with an older version of IE 11, but the IE version being used is even newer than the version that fixed the related bug.
Just in case there's something in the DisclosureRegister.js file that's causing IE 11 to abort the javascript, I'm including the code for that as well:
(function (win, doc, $, undefined) {
//Don't run if jQuery isn't loaded
if (typeof window.jQuery === 'undefined') {
return;
}
alert("Script is being called!");
}(window, window.document, window.jQuery));
The question:
While I'm certainly not ruling out an error with my code (and of course, please correct me if it's wrong), is there anything peculiar with IE 11 in the way it handles javascript bookmarklets that I need to account for in the code?
Thanks in advance for your time!
I wrote that article. Really glad you guys are finding it useful.
It seems there a bunch of people complaining about bookmarklets not working properly in IE11. One thing I'd test is how IE11 handles same origin policy. Check out this link, and see if you can temporarily disable same origin policy. Then test.
Obviously it won't solve the problem, but it could lead you in the right direction.
Hope that helps a bit. Let me know.
I think I found what is the problem with bookmarklets in IE11. I just added a bookmarklet in IE11 and it wasn't working so I started googling and found this page. Then I found bookmarklets at Microsoft's own website where they actually recommend to use it and it works. Then I decided to check if the syntax is correct and this where I found a problem. For some reason IE cuts part of long bookmarklets when it adds it to the toolbar by draggin-dropping. My bookmarklet that I was tried to add was several brackets short of original and because of that the syntax was incorrect. I then copy-pasted full code manually and it started working.
I was able to resolve the same problem by removing all line breaks from the bookmarklet code. IE 11 apparently doesn't know how to handle them.
With line breaks in the bookmarklet code, after adding it to "Favorites" the properties showed a blank URL and nothing would happen when clicking it.
With the linebreaks removed (ran a regex to collapse all whitespace to a single space character), after adding it to the "Favorites" the properties show the correct javascript in the URL field and it runs correctly when clicked.
I wasn't able to find anything anywhere documenting this limitation.

Internet Explorer 9 appearance conflict

I have been researching all over the internet about this, and unfortunately cannot find out why this is happening. It seems to only be happening in internet explorer 9, on certain computers.
The entire page looks like a mess only in IE 9 (some computers):
The URL of the website is Here
Can anyone tell me why this is happening in IE9?
(NOTE: Compatibility view cleans it, but then the Js/jQuery doesn't work right).
For some reason, IE thought that the site was in my intranet, and rendered it in Compatibility Mode (there's a setting in IE to automatically render intranet sites in CM).
When I unchecked the box to "automatically detect intranet network", the site rendered correctly.
So your real question is how does IE determine the intranet network, and how can you force your page to NOT render in Compatibility Mode... something like this.
I noticed that you have blank space above your doctype. IE hates this. The doctype needs to be the very first thing in the file.
You also have over 2300 HTML validation errors that should be investigated and rectified. Again, IE is very sensitive to invalid HTML.
Going on a whim here, but I think it's the usage of inline-block. I don't have IE9 installed to a point where I can use it's developer console to further inspect, but IE is known to be very bad about displaying inline-block elements.
In Google Chrome's console, I am able to replicate the same appearance using float:left as opposed to display:inline-block, so that should solve that piece of the issue.
Edit: The only syntax issue I see with the HTML is the placement of the </head> tag, which is not adjacent to the <body> tag.
Edit 2: As far as the outlining issue goes, try using this answer to another question.
Edited yet again to fix the display of the tags.

<Noscript> tag not working in IE6. May I have some help, please?

Does anyone know why this doesn't work in IE6?:
<noscript>This requires javascript</noscript>
It seems simply enough, but unlike FF, IE6 doesn't show it when I disable javascript.
It's really confusing :( I thought the tag was supposedly compatible acrosss browsers? Well, atleats from the W3 profile page for the tag. (http://www.w3schools.com/tags/tag_noscript.asp)
Any help would be great!
Fiton
Unlike, say, Firefox, you have to restart IE after disabling javascript for javascript to actually be disabled. If you did that but are still not seeing your noscript contents, please explain the exact steps you're taking to disable javascript.

I made some voting buttons (think reddit/digg/etc) however they don't work below IE8

http://www.projectfitfamilies.org/recipes.php?page=treats
It only works in IE8 quirks mode, standards mode doesn't do anything. I don't have IE6 or 7 to test it out on directly, but I imagine if IE8 quirks fails, then so will IE6 and 7.
Thanks!
Per request, my content header:
header("content-type:application/xml;charset=utf-8");
Not necessarily. To check out how your site works in IE7 standards mode, you can use the (F12) developer tools to change the browser mode. For IE6, I would recommend using IETester
Your reciepies.php header looks something like this:
header("content-type:application/xml-xhtml;charset=utf-8");
You need to replace it with something this:
header("content-type:application/xml;charset=utf-8");
IE does not function with the xhtml.
Hope this helps, Julian
You can use conditional comments to strip out this function. IE6/7 are very old browsers, better to write clean code than to put some hacks so site can work 100% fine (if it's not commercial project).
For my personal experience, i put links to every browser download site (beside IE) when i detect IE6/7 on personal sites. Because nice HTML4 code with modern CSS works really bad in 6/7.
Add #numberwrapper12 { margin-left:33px; } to make it work in IE8 standards mode.
Seems to work fine in IE7. IE6 has some issues. Most noticeably, your sprite arrows don't display properly and you should add `.arrowwrapper a { overflow-y:hidden; } to fix that. Also the '# of votes' doesn't stay on one line. Widening the votebox by a single pixel fixes that.

Categories