blob: e492c2327a3991f500ceafb25f0f382353e62687 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<!-- Copyright (c) 2013-2014 Texas Instruments Incorporated. All rights reserved. -->
window.onload = function()
{
document.getElementById('about').onclick = loadAbout;
document.getElementById('overview').onclick = loadOverview;
document.getElementById('block').onclick = loadBlock;
loadPage("about.htm");
}
function loadAbout()
{
loadPage("about.htm");
return false;
}
function loadOverview()
{
loadPage("overview.htm");
return false;
}
function loadBlock()
{
loadPage("block.htm");
return false;
}
function loadPage(page)
{
if(window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", page, true);
xmlhttp.setRequestHeader("Content-type",
"application/x-www-form-urlencoded");
xmlhttp.send();
xmlhttp.onreadystatechange = function ()
{
if((xmlhttp.readyState == 4) && (xmlhttp.status == 200))
{
document.getElementById("content").innerHTML = xmlhttp.responseText;
}
}
}
|