-
Nov 23rd, 2015, 01:52 PM
#1
Thread Starter
New Member
[RESOLVED] Webpage works in IE/FF but doesn't work in Chrome/Edge
New to the forum and hopefully this is the right forum for this kind of question.
I am saving Visio 2016 as a webpage and it typically creates a search box on the left side using javascript.
This search box works in IE and FF but for some reason doesn't work in Chrome or Edge.
I tried checking Visio forums but nobody really knows what's going on. I figured maybe I can edit the HTM file to enable it for Chrome/Edge?
Anybody have any ideas?
Pretty sure the search box is the JS file frameset.js...
Maybe I can add a flag that gets chrome to load it?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Title" content="Process Sequence_Rev3"/>
<meta name="Subject" content=""/>
<meta name="Category" content=""/>
<meta name="Keywords" content=""/>
<meta name="Description" content=""/>
<meta name="Author" content="Suji K"/>
<meta name="Manager" content=""/>
<meta name="Company" content="Viking Air"/>
<title>Viking Intranet</title>
<script src="QMS_WEB_files/frameset.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript" >
EDIT**
SO I managed to get it showing up.
In that frameset.js file, there's a callout looking for Firefox or IE but nothing for Chrome.
I changed it to look for Chrome and now the search bar shows up.
But when I search for things, it returns no results. I guess it's not finding the index for my site? (works fine in IE.)
Cant find any browser specific callouts in the "find.js".
Any clue on why a find js would work in IE but not Chrome?
Last edited by suthek; Nov 23rd, 2015 at 04:28 PM.
-
Dec 17th, 2015, 01:12 PM
#2
Re: Webpage works in IE/FF but doesn't work in Chrome/Edge
Cross-browser Javascript issues are common and numerous; likely the script is using some non-standard functionality that's unsupported by Chrome and Edge. You may be able to discover the issue with Chrome's Javascript console (press F12, reload the page, indicative error messages might show up), but correcting it may not be worth your time if it's going to involve reinventing the script with a compatible solution.
-
Dec 17th, 2015, 02:14 PM
#3
Thread Starter
New Member
Re: Webpage works in IE/FF but doesn't work in Chrome/Edge
Originally Posted by SambaNeko
Cross-browser Javascript issues are common and numerous; likely the script is using some non-standard functionality that's unsupported by Chrome and Edge. You may be able to discover the issue with Chrome's Javascript console (press F12, reload the page, indicative error messages might show up), but correcting it may not be worth your time if it's going to involve reinventing the script with a compatible solution.
Sorry I forgot to reply with the solution. I figured it out doing similar to what you suggest. (the error messages in chrome.)
Within the file:
Change:
var fShowWidgets = (MSIE && ver >= 5 && !isMac) || isFirefox;
to:
var fShowWidgets = true;
Change:
function XMLData(file)
{
var temp = null;
if(isUpLevel)
{
// for IE
if (MSIE)
{
temp = CreateObject("Microsoft.XMLDOM");
if (temp == null)
temp = CreateObject("Msxml2.DOMDocument.6.0");
}
// for everything else
else
{
try
{
temp = document.implementation.createDocument("", "", null);
}
catch(e) {}
}
if (temp != null)
{
temp.async = false;
temp.load(file);
if (MSIE && temp.parseError.errorCode != 0)
temp = null;
}
}
return temp;
}
To:
function XMLData(dname) {
var temp;
try {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', dname, false);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send('');
temp = xmlhttp.responseXML;
} catch (e) {
try {
temp = new ActiveXObject("Microsoft.XMLDOM");
} catch (e) {
console.error(e.message);
}
}
return temp;
}
-
Dec 18th, 2015, 08:52 AM
#4
Re: [RESOLVED] Webpage works in IE/FF but doesn't work in Chrome/Edge
That nested try/catch can be avoided:
Code:
if (window.XMLHttpRequest) {
// XMLHttpRequest code here
}
else if (window.ActiveXObject) {
// Non-standard code here
}
else {
// Failure
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|