I am using jqmath for math rendering.Here is the complete code
<!DOCTYPE html>
<html lang="en" xmlns:m="http://www.w3.org/1998/Math/MathML">
<head>
<meta charset="utf-8">
<script src="jquery-1.4.3.min.js"></script>
<script src="jqmath-etc-0.4.0.min.js"></script>
<title>Displaying maths</title>
</head>
<body>
<p>If $ax^2+bx+c=0$ with $a≠0$, then:
$$∰f'(x)=\lim↙{h→0}{f(x+h)-f(x)}/h$$
</p>
</body>
</html>
It is working perfectly in firefox but not in chrome 32 and IE 8.I checked the compatibility and it says jqMath is compatible with both the versions.So why it is not working?
The strange part is that the home page of jqmath is working perfectly and when I write math expressions in the text area available for practice on the homepage, that is also being rendered properly.So where is the problem?
EDIT
The symbols are appearing but are scattered.It seems the problem is only with divide-by e.g. 2/3.If I visit homepage of jqmath using same version of chrome and write the same expressions in the test area provided, they are rendered correctly.
Example1
firefox(correct)
chrome(wrong)
Example2
firefox(correct)
chrome(wrong)
jqMath uses built-in MathML in browsers that have it, namely Firefox and recent versions of Safari (webkit). Sadly I.E. and Chrome are not so advanced (though old versions of I.E. could use the MathPlayer plugin for MathML), so jqMath has to use its own .css file to help with formatting. This explains the solution you found.
Related
I'm having a problem with a piece of in-line JavaScript in Firefox. It's s simple SetTimeout() method within an <a> element that sets a delay (to allow time for an animation to play out) before opening the destination link in question.
The Problem:
When I click on the link in Firefox I get taken to a white page with the number 2 in the top left hand corner of the screen.
Other Browsers:
Opera, Chrome, Edge, AVG Secure Browser - all work as expected and open the destination link as expected.
The Code:
I've stripped down the code to the bare minimum in order to isolate the problem and realise that it is the in-line JS within the link that Firefox does not like (or is completely ignoring!) Whatever it is, I get no warnings or exceptions thrown when looking in FF developer tools.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<nav>
<p id="homepage">
<a
href="javascript:setTimeout(()=>{window.location = './index.html'},500);"
>Home</a
>
</p>
</nav>
</body>
</html>
At first we thought this could be an IDE problem or server related issue but those possibilities have been eliminated.
Has anyone seen this problem before or know why I'm encountering this purely in Firefox?
According to this MDN
When a browser follows a javascript: URI, it evaluates the code in the URI and then replaces the contents of the page with the returned value, unless the returned value is undefined. The void operator can be used to return undefined
Like suggested, try using the void operator:
Home
You are using an arrow function syntax which is not standardized among all browsers apparently. Also is not backwards compatible and you should either use a compiler such as Babel, or either write classical functions syntax style code.
UPDATE: just use this code if you want it to work.
<p id="homepage">
<a
href="index.html" onclick="window.setTimeout(function(){window.location = './index.html'},500); return false"
>Home</a
>
</p>
I am having problems with JavaScript code not executing in iOS devices when I use the type="module" attribute.
iOS 14 seems to run it ok, however earlier versions do not.
I created a basic test (see below code) which runs fine on other devices (android mobiles and tablets, desktops) except iOS.
When running the test site on iOS 12 using three different browsers Chrome, Firefox and Safari the script still do not execute. I have even run on multiple iOS 12 devices.
I have discovered when I remove the type="module attribute the JavaScript file executes fine.
I thought perhaps iOS was not compatible with modules however according to caniuse.com JavaScript modules are compatible with iOS 11 and greater.
The code for my test site (not working on iOS) is:
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Site</title>
</head>
<body>
<h1>Test Site v16.0</h1>
<p id="text-message">:( the module is not working...</p>
<button id="btn-change">This is a button, can you Click Me</button>
<script type="module" src="script2.js"></script>
</body>
</html>
script2.js
"use strict"
document.getElementById("btn-change").addEventListener("click", (e)=> {
alert("OK, if you can see this message the script is working....");
} );
const message = document.getElementById("text-message");
message.innerText = "If you can see this it means the module is working! ";
I know the problem has something to do with the type="module" attribute, however as I import/export in JavaScript (not shown in the test) I need to include this attribute.
I am relatively new to web design so there may be something vital I have not learnt yet, so any assistance or explanation would be much appreciated.
I have a GWT 2.6 app which works fine on every browser except in IE (IE11). I am compiling application for all browsers. Using developer tools (console posts) i can see that application does load as it should be, but the page is blank and nothing is shown. No error appears in console and there is only a warning...
HTML1524: Invalid HTML5 DOCTYPE. Consider using the interoperable form "<!DOCTYPE html>".
File: user, Line: 1, Column: 1
...concerning application HTML file. I removed all Views and Widgets and left only basic view with some background and picture, and it still does not load properly only in IE.
I tried adding
<meta http-equiv="X-UA-Compatible" content="IE=5,6,8,9" >
to app html file but it doesn't make a difference nor does a Compatibility View settings and changing Document Type. I really do not care so much about app working in older IE versions, but >9 is preferable.
What am i missing here?
EDIT:
Actually the problem was having DockLayoutPanel in my View. Changed DockLayoutPanel into DockPanel and the application appeared (with some differences comparing to UI in other browsers).
Make sure that your html host page is properly formatted. It should start with the DOCTYPE declaration, followed immediately by <html> tag:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
...
Microsoft IE8 and IE9 used to offer functionality to start
a WebDAV explorer on a Windows computer from within a WebPage:
<HTML>
<HEAD>
<SCRIPT>
function fnDavStart(oSpanObj, sPath) {
oSpanObj.navigateFrame(sPath, "_blank");
}
</SCRIPT>
</HEAD>
<body>
<div ID=davDiv>
<SPAN ID=oWebDavHelper style="behavior:url('#default#httpFolder');" onclick = "fnDavStart this, 'https://webdav.myserver.com')">
Click here for WebDAV folder
</SPAN>
</div>
Now the method navigateFrame() and/or the behaviour "httpFolder" seems to be gone in IE11.
How to get similar functionality in IE11?
Thanks,
You can force IE to render like IE9 with this code in your meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
It will make all IE versions (even the ones not yet released) to render pages and javascrit like IE9.
I havent used the behaviour approach before, but have you checked if the SharePoint OpenDocuments object still works?
Open Now
Here's some code with the js embedded in java.
https://github.com/miltonio/milton2/blob/master/milton-server-ce/src/main/java/io/milton/http/fs/FsDirectoryResource.java
I'm trying to use the piroBox (http://www.pirolab.it/pirobox/index.php) jQuery plug-in to make a gallery. I'm also using <!DOCTYPE html>. With this DOCTYPE, the images that are supposed to appear in a modal dialog appear at the bottom of the page. Removing the DOCTYPE makes it perform as expected.
Is there any way to make the plug-in and the doctype play nice without changing the DOCTYPE?
What browser are you using? I tested <!DOCTYPE HTML> with the examples from piroBox, and it worked in Safari. If you're using IE, you might need to install an HTML5 compatibility script: http://remysharp.com/2009/01/07/html5-enabling-script/