We have use the following html code snippet. While right click on that html file and open with the Operamini, Mozila,Safari, Chrome are working fine but it did not working in the internet Explorer.
Code snippet[html]:
<!DOCTYPE html>
<head>
<title>Simple Example</title>
</head>
<body>
<script type="text/javascript">
function displaymessage() {
alert("hai");
}
displaymessage();
</script>
</body>
Can you please any one look into this and provide suggestion to resolve the problem . Thanks in advance.
Regards,
Rajasekar
try this:
1) add html tag to open the page
2) internet explorer blocks "activeX" contents, you should click on the top and unlock them...
By default Internet Explorer restrict running script and ActiveX Controls. If you are not getting any warning, then Go to Tools --> Internet Option ---> Advanced ---> Security ---> Restore Defaults for "Security level for this zone".
Hope this may help.
Related
<!DOCTYPE html">
<html lang="en">
<head>
<meta charset="utf-8">
<title> Redirecting EWS Manager to Chrome </title>
<h1>Browser Redirecting ......</h1>
<script type="text/javascript">
{ varshell = new AciveXObject("WScript.Shell");
shell.run("Chrome //new Link here//");
window.location.replace("#old link the default browser"):}
setTimeot("pageRedirect()",3000);
</script>
</head?
</html>
Above code is for redirecting and named as redirect.html. But it only works when I open my website in IE so that it will redirect to Chrome. But If I open in Chrome, it will only shows Redirecting to Chrome. It does't work in Chrome, It only works in IE. Opening in IE and redirecting to Chrome is works. But reopening in Chrome doesn't work. May I know why and can you please show me a way to fix it?
echo " <tr><td class=\"left_padding\"><a class=info href=\"http://sgewsweb.amk.st.com:8080/web/system/usermgr7/redirect_edge.html\" >User Manager<span>EWS Administrator</span></a></td></tr>";
This link is from my default homepage. When I click to the tab, it opens in Chrome. Some says I have to do with onclick function but I have no idea how to use it. Can you please fix it for me?
enter image description here
When I open Chrome, it pperars like this.
You can try redirecting through header location in php. It will work in all browsers. However, it needs to be placed before any html output.
<?php header('Location: newlink.php'); ?>
Google translation icon doens't appear on a website I'm working on, and I can't find a reason for this. Should I add a specific code to enable chrome to suggest translating it?
Please note that I don't want to add Google Chrome widget, and Chrome settings are OK.
I'd like to make Chrome suggests to translate the pages of the website.
Here's an example: https://drive.google.com/file/d/1hKlPcs_HnIXApSa7jYX1pvDZigvdh9mc/view?usp=sharing
You can force the Chrome Translate dialog to show up by adding the lang tag with the language. This should work as long as the user doesn't have the settings in Chrome to never translate. Some people turn off that dialog in the chrome settings because they do not want to be annoyed by the translate dialog.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language
sample html.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
<p>这只是一个测试。</p>
</body>
</html>
Can you try adding text in another language except english and then load the page ?
I am trying to use zebra datepicker library in my project. I have followed the instructions here and written the following codes:
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="assets/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="assets/Zebra_Datepicker-master/public/javascript/zebra_datepicker.js"></script>
<link rel="stylesheet" href="assets/Zebra_Datepicker-master/public/css/metallic.css" type="text/css"></link>
<script type="text/javascript">
window.onload = function(){
$('#calendarValue').Zebra_DatePicker();
}
</script>
</head>
<body>
<div id="calendarContainer">
<input type="text" id="calendarValue"></input>
</div>
</body>
</html>
This results into a yellow icon attached to a text field with the id 'calendarValue', and the icon loads a calendar when gets clicked. I am getting the expected result in chrome, firefox and internet explorer 10 and 11.
While it is mentioned by the developer (Stefan Gabos) of zebra, that following strict doctype () makes it compatible with IE6+, and the example html's in zebra datepicker package also works fine to load the datepicker on IE9 particularly, my codes does not load the datepicker UI when I test it on IE 9; only the yellow icon gets attached to the text box and the calendar UI does not open when the button is clicked. It can be seen I did use doctype in my code so it should have been a problem to get the UI with old versions of IE, but that is not so in my case. Screenshots are given below:
I am a noob in web developing, and I cant figure out what is wrong here.
Hope everything is explained in detail this time.
Actually the problem was my company has policy to render intranet sites in compatibility view in IE which was causing troubles here. I used edge meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
which is forcing my site to load in default standard mode in IE and fixed my issue.
Hope it would help noob people like me in the dark
In my HTA application I'm using a JavaScript calendar window, it opens using window.open() and closed using window.close(), when the user clicks on one of the dates. This calendar works fine on multiple browsers and versions over more than 10 years. It even works in HTA applications most of the time.
However on specific workstations running IE11. The window.close() command is simply ignored, resulting in the window left open. On other IE11 workstations it works fine. I figured that turning off the "Enable Protected Mode" checkbox on IE11, Internet Options, Security tab resolves the problem on one of the problematic workstation. However, other workstations works fine with this setting turned on and turning off this setting is not an acceptable solution.
Code sample which reproduces the problem:
HTA application
<HTML>
<HEAD>
<HTA:APPLICATION ID="OpenCloseExample" BORDER="thick" BORDERSTYLE="complex"/>
<TITLE>Open Close HTA container</TITLE>
</HEAD>
<iframe width="1024px" height="768px" src="http://localhost:28080/openclose.html"/>
</HTML>
openclose.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Main Page</title>
<script src="openclose.js"></script>
</head>
<body>
open
</body>
</html>
openclose.js
var win;
function openWindow() {
win = window.open("", "_blank", 'width=250,height=250,status=no,resizable=no,location=no,top=100,left=100');
win.document.writeln("<html><head><script src='openclose.js'></script></head><a href='#' onclick='javascript:window.opener.closeWindow()'>close</a></html>");
}
function closeWindow() {
win.window.close();
}
I can't see this working in any IE with any settings. The problem is this string: <script src='openclose.js'></script>. That is, a literal ending script tag in a string works as an ending script tag on a page, when HTML parser will find it. This means, that your script was never loaded.
To fix this, you've to break the literal tag, for example like so:
<script src='openclose.js'><\/script>
Since you have pointed out that IE11 is causing the JS not to work, you can force IE to render in an older version very easily.
<meta http-equiv="X-UA-Compatible" content="IE=9">
This meta tag is very popular amongst HTA applications for utilizing JS/ActiveX methods/properties within specific IE versions (most of them being deprecated).
For more information, visit the X-UA-Compatible Tag Wiki
Hope this helps
I figured this out eventually.
Changing:
open
to:
open
Has resolved the problem
The following code will fail in both of my chromes on 2 different computers (Windows 7 both of them, Chrome 12.0.742.100).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test</title>
<script type="text/javascript">
location.hash = "#one";
location.hash = "#two";
location.hash = "#three";
</script>
</head>
<body>
This will error out "Uncaught Error: can't load XRegExp twice in the same frame" in chrome. Anyone got an answer?
</body>
</html>
I feel like I tried everything. Can anyone confirm this error on chrome, and does anyone have an idea as to how I fix it? Thanks a lot.
URL to error:
http://jalsoedesign.net/test/hashchanging/
I should add:
It works fine, does what it should (changes the page hashes), but still comes out with an error.
It works fine with me on Chrome 12.0.742.100 on Win7. I'm assuming you have installed extensions? disable all extensions (or go to incognito mode) and try to load your page again. Errors from content scripts are also displayed in the javascript console. If you are not using XRegExp on your page, probably one of the extensions does.
Edit:
The source of the exception should be located to the right. Click it to go to the script that caused the exception.
Extensions that use XRegExp should upgrade to v2.0.0 or later. That will avoid this error even when XRegExp is (inappropriately) loaded more than once in the same frame.