summaryrefslogtreecommitdiff
path: root/src/runtime/javascript/minibar/minibar.html
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2010-09-24 12:47:18 +0000
committerhallgren <hallgren@chalmers.se>2010-09-24 12:47:18 +0000
commit72fe93a8c4d84764dc2bf4705716a5e509909e3b (patch)
treebb8eab78cee90daaa366a4f11410773d32125d55 /src/runtime/javascript/minibar/minibar.html
parent8ce7ef3bddc1707f36f62ce62e1cce7781bec63a (diff)
minibar.html: specify charset, move initialization
Added a meta tag to specify that the file is in UTF-8. This makes the browser (at least Firefox) assume that the JavaScript files are also in UTF-8, it seems. Moved the call to start_minibar() from the <body onload="..."> to the end of the file. The onload action is not executed until all images in the document has been loaded, while javascipt at the end of the file is executed as soon as the HTML file has been loaded. (Calling start_minibar() from the head of the document would be too soon, since it refers to elements in the body, which hasn't been loaded yet.)
Diffstat (limited to 'src/runtime/javascript/minibar/minibar.html')
-rw-r--r--src/runtime/javascript/minibar/minibar.html33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/runtime/javascript/minibar/minibar.html b/src/runtime/javascript/minibar/minibar.html
index 4e5c1f161..da7d66a55 100644
--- a/src/runtime/javascript/minibar/minibar.html
+++ b/src/runtime/javascript/minibar/minibar.html
@@ -4,23 +4,14 @@
<link rel=stylesheet type="text/css" href="minibar.css">
<script type="text/JavaScript" src="support.js"></script>
<script type="text/JavaScript" src="minibar.js"></script>
-<script type="text/JavaScript">
-var my_options= {
- server: "http://www.grammaticalframework.org:41296",
- //server: "http://tournesol.cs.chalmers.se:41296",
- //server: "http://localhost:41296",
- //grammar_list: ["Foods.pgf"],
- show_abstract: true,
- show_trees: true,
- show_grouped_translations: false,
- try_google: true
-}
-</script>
<meta name = "viewport" content = "width = device-width">
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+<meta charset="UTF-8">
+
</head>
-<body onload="start_minibar(my_options)">
+<body>
<h1>Minibar</h1>
<div id=minibar>
</div>
@@ -32,12 +23,26 @@ var my_options= {
&amp; <a href="http://www.grammaticalframework.org:41296/translate/">Translator</a>]
</small>
<small class=modtime>
-HTML <!-- hhmts start --> Last modified: Fri May 28 18:16:11 CEST 2010 <!-- hhmts end -->
+HTML <!-- hhmts start --> Last modified: Fri Sep 24 14:30:47 CEST 2010 <!-- hhmts end -->
</small>
<address>
<a href="http://www.cs.chalmers.se/~hallgren/">TH</a>
<img src="http://www.altocumulus.org/~hallgren/online.cgi?icon" alt=""></address>
</body>
+<script type="text/javascript">
+var my_options= {
+ //server: "http://www.grammaticalframework.org:41296",
+ //server: "http://tournesol.cs.chalmers.se:41296",
+ server: "http://localhost:41296",
+ //grammar_list: ["Foods.pgf"],
+ show_abstract: true,
+ show_trees: true,
+ show_grouped_translations: false,
+ default_source_language: "Eng",
+ try_google: true
+}
+start_minibar(my_options)
+</script>
</html>