File:
[LON-CAPA] /
loncom /
html /
adm /
jsMath /
jsMath-loader.html
Revision
1.3:
download - view:
text,
annotated -
select for diffs
Tue Oct 9 21:29:16 2007 UTC (17 years, 4 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_X,
version_2_7_99_1,
version_2_7_99_0,
version_2_7_1,
version_2_7_0,
version_2_6_X,
version_2_6_99_1,
version_2_6_99_0,
version_2_6_3,
version_2_6_2,
version_2_6_1,
version_2_6_0,
version_2_5_99_1,
version_2_5_99_0,
version_2_12_X,
version_2_11_X,
version_2_11_6_msu,
version_2_11_6,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
bz6209-base,
bz6209,
bz5969,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ5971-printing-apage,
BZ5434-fox,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse
- jsMath 3.4e
1: <html>
2: <head>
3: <!--
4: | jsMath-loader.html
5: |
6: | Part of the jsMath package for mathematics on the web.
7: |
8: | This file is used for jsMath components when the browser doesn't
9: | handle the XmlHttpRequest function, or when they must be obtained
10: | from a server other than the one server the page that is using jsMath.
11: |
12: | ---------------------------------------------------------------------
13: |
14: | Copyright 2004-2006 by Davide P. Cervone
15: |
16: | Licensed under the Apache License, Version 2.0 (the "License");
17: | you may not use this file except in compliance with the License.
18: | You may obtain a copy of the License at
19: |
20: | http://www.apache.org/licenses/LICENSE-2.0
21: |
22: | Unless required by applicable law or agreed to in writing, software
23: | distributed under the License is distributed on an "AS IS" BASIS,
24: | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25: | See the License for the specific language governing permissions and
26: | limitations under the License.
27: -->
28: </head>
29: <body>
30:
31: <script>
32: var showWarning = 0;
33: while (!window.jsMath && !showWarning) {
34: try {
35: window.jsMath = window.parent.jsMath;
36: if (!window.jsMath) {throw "no jsMath";}
37: } catch (err) {
38: showWarning = 1; pageDomain = '';
39: try {pageDomain = document.domain} catch (err) {}
40: //
41: // MSIE on Mac can't change document.domain, and 'try' won't
42: // catch the error (Grrr!) so don't even attempt it.
43: //
44: if (pageDomain.match(/\..*\./) &&
45: (navigator.appName != 'Microsoft Internet Explorer' ||
46: !navigator.platform.match(/Mac/) || !navigator.userProfile || !document.all)) {
47: try {
48: document.domain = pageDomain.replace(/^[^.]*\./,'');
49: showWarning = 0;
50: } catch(err) {}
51: }
52: }
53: }
54:
55: function Warning () {
56: alert(
57: "jsMath can't load one of its required components, because jsMath " +
58: "was not obtained from a server that is in the same domain as the " +
59: "page that loaded it."
60: );
61: }
62:
63: isOmniWeb4 = (document.readyState == 'loading' &&
64: navigator.accentColorName != null &&
65: navigator.omniWebString == null);
66:
67: if (showWarning) {setTimeout("Warning()",1)} else {
68: debug = window.parent.debug; show = window.parent.show;
69: jsMath.Script.window = window; url = jsMath.Script.url;
70: if (isOmniWeb4) {
71: if (url != jsMath.Script.prevURL) {
72: jsMath.Script.prevURL = url;
73: document.writeln('<script src="'+jsMath.root+'jsMath-loader-omniweb4.js"><'+'/script>');
74: document.writeln('<script src="'+url+'"><'+'/script>');
75: document.writeln('<script src="'+jsMath.root+'jsMath-loader-omniweb4.js"><'+'/script>');
76: }
77: } else {
78: jsMath.Script.Start();
79: document.writeln('<script src="'+url+'"><'+'/script>');
80: }
81: }
82: </script>
83:
84: <script>
85: if (window.jsMath && !isOmniWeb4) {
86: jsMath.Script.End();
87: jsMath.Script.endLoad();
88: }
89: </script>
90:
91: </body>
92: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>