This page exists as a file in an ASP.NET application with target framework 3.5.
I've been experiencing an error on my site (first reported yesterday) that has to do with users having Chrome Frame installed on IE8 or IE9 and them clicking on a link to Open a New Window. The Child page opens up, but when the Child Window is closed (or sometimes before), the Parent Window Crashes. (The screen is completely grey).
Test code which replicates this issue is below, but I have no idea what is occurring or how to resolve it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />
</head>
<body>
<button id="open-link">Hi</button>
<script>
var a = document.getElementById("open-link");
a.addEventListener("click", function () {
window.open("http://google.com", "Browser");
}, false);
</script>
</body>
</html>
I am seeing the same issue while on a different platform, so it is not an ASP.net. If you are using Chrome Frame, use window.open to open another window, then close that window, it crashes the remaining tab/window. If your window being opened is outside of the same-domain policy then it crashes the opening tab on opening instead of on close.
I do not have a workaround or solution yet, will post if I find one.
Can use a normal anchor link, and you said it's generated dynamically.
Set dynamic url to a variable either in tags in view or global namespace.
var dynamicUrl = {{myUrl}},
urlTitle = {{myUrl.title}}; // Or whatever construct is generating.
HTML
Hi
Related
I have a classic asp application which runs on the IE 11 Enterprise mode, where I added the jQuery popup with some search function on it. This functionality works properly with Normal mode but not with Enterprise mode(search functionality and CSS for popup to look decent). Anybody knows the reason?
I have added the below libraries.
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript" src="../javascripts/lib/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="../javascripts/lib/chosen_v1.1.0/chosen.jquery.min.js" type="text/javascript"></script>
And there are tow other JavaScript file which is related to the popup functionality.
The page is a part of the iframe and iframe contain the above changes.
I would appreciate your help. Thanks in advance.
I found the answer and below are the changes.
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11">
Context
I'm trying to simulate a WebView using Intel XDK. Before reading some post on Stack Overflow I read that the better way to archive this is using a window.location = "url";. It worked like a charm.
Problem
Now I want to bind the hardware backbutton, so the user can confirm is he want or not to close the app. The problem is that it only works if the window.location doesn't execute.
Code
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="cordova.js"></script>
<script>
window.location = "https://google.com";
var tried = false;
document.addEventListener("backbutton", backButton, false);
function backButton(){
if (tried){
navigator.app.exitApp();
}
else {
alert('TEST: Next time APP should close');
tried = !tried;
}
}
</script>
</head>
<body>
</body>
</html>
Results
Commenting window.location
Executing window.location
Thanks!
Each page has it's own javascript, if you switch the page all the javascript will be lost.
If you want to make it work, you'll need to have the same backbutton handler code on any page where you redirect using location.href, and you'll need to link cordova.js too.
That means you can only make it work on pages you can control the code they load, not on google.
If you want to do it on any page, even on pages you can't control, then you can't use cordova javascript code as it will disappear, you'll need to change how cordova java code controls the back button behaviour, it's done on this method:
You'll have to detect the KeyEvent.KEYCODE_BACK and show a native dialog to close the app there
I have a master page with this tag <meta http-equiv="X-UA-Compatible" content="EmulateIE8"/> . Problem is my screen within master page runs angularjs 1.4, and was developed for chrome. Now I'm told IE must also work. We run IE 11 but master page forces IE8 compatibility. Is there any way to OVERRIDE this (temporarily preferably)? when my screen (via wicket) is loaded?
simply placing <meta http-equiv="X-UA-Compatible" content="EmulateIE11"/> in my HTML has no effect, also tried a java filter applying this, but the master page seems to take precedent.
Any help desperately appreciated!
EDIT -
would this work in my master page:
<meta http-equiv="X-UA-Compatible" content="IE=8, IE=9, IE=10, IE=11" >
?
I'm facing very strange behaviour in Chrome & Mozilla from jQuery. I'm getting very generic Unexpected token ILLEGAL error on my document.ready function.
While playing with a signaturepad sample, I tried it with my own page. It is not working in Mozilla & Chrome, but is working in IE. Then I removed all references of signaturepad and put a simple one alert inside document.ready function and observed (Thanks to Chrome JavaScript Errors Notifier) Unexpected token ILLEGAL error is occurring when system try to use jQuery reference. Then I copied all the text from the sample page (a.html), where it works perfectly inside this page (b.html), and ran the page again. I'm surprised the a.html page is working fine while b.html page is throwing the error. Both pages are on the same directory and have the same content.
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title> </title>
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
<link href="css/jquery.signaturepad.css" rel="stylesheet">
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function () {
alert('hai');
})
</script>
</body>
</html>
Problem fixed now. Issue was in Encoding through which file was saved. The problematic file was saved with Unicode-1200 while it should be saved with Unicode-65001.
Thanks all for answering/comments.
Regards
I would do a few things that may sound silly --
Add a <!DOCTYPE html> tag to the top -- jquery mobile likes it
remove the indentation in front of your <html lang="en"> tag
redownload or try to use a hosted jquery library (e.g. from google) to see if that's it
add a closing ; after your })
I have the following code in a .js page that should open a report in a blank page. This will only work if the site is added to the compatibility list of my IE11.
window.open("RosterList.aspx?strWhere= " + strWhere + "&strSort=" + strSort, '_blank');
My users are on IE9 and when they select the report it just displays a blank screen and a spinning loading icon.
If they go into their IE and add the site to their compatibility list, the report will display.
The question is ... what to I need to write in my application that will force the site into compatibility mode. My MasterPage already contains the statement
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
but this has no effect?
Try this one:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />