Hi there :) I'm creating a Windows 7 sidebar gadget and I need a html
string to show the content of a txt file. I can't get it to work. Can anyone help me make thsi work please? Be gentle with me :) This is my html file:
<html xmlns="http://ift.tt/lH0Osb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Unicode" />
<title>-</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/jscript" language="jscript">
function init()
{
var oBackground = document.getElementById("imgBackground");
oBackground.src = "url(images/bg.png)";
document.getElementById("Acc_1").innerHTML=ReadFiles();
};
function ReadFiles()
{
var fso, ts, s;
var ForReading = 1;
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fso.OpenTextFile("Accounts.txt", ForReading);
s = ts.ReadLine();
ts.Close();
return s;
};
</script>
</head>
<body onload="init()">
<g:background id="imgBackground">
<span id="accountList">
<div id="1" class="acc">
<p id="Acc_1" class="acc-text"></p>
</div>
</span>
</g:background>
</body>
Aucun commentaire:
Enregistrer un commentaire