well i found some
information about javascript acessing files on the server(A.K.A. external file), and guess what??? i found that
is possible....
here is the code to use and change and test ....
i think that this may be of some use for those who wants a shoutbox, a guest book or even some news being displayed on the hfs.
tested and only works on the internet explorer, at least until somebody help me here...or it may be useless to all, but for sure it will be useless when hfs support any server side code.... like asp, php, cfm, ruby, cgi....
hehhe
and about the code...
here i got 2 files
Read_External_File.html
news.txt
the content of the files is this
the html
<html>
<head>
<title>
ledufe- test of acessing a external-TXT file with javascript - Only On IE 5.5 or upper versions
</title>
</head>
<body>
<object id="ticker" classid="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<param name="DataURL" value="news.txt">
<param name="UseHeader" value="TRUE">
<param name="FieldDelim" value="#">
</object>
<script type="text/javascript">
function tdcticker(){
tickerSet.MoveNext();
if (tickerSet.EOF) //if end of data's file
tickerSet.MoveFirst()
setTimeout("tdcticker()",5000);
}
function init(){
tickerSet=ticker.recordset
tickerSet.moveFirst()
setTimeout("tdcticker()",5000)
}
</script>
<h3>HFS-News Ticker</h3>
<a href="" datasrc="#ticker" datafld="messageURL" target="_blank"
style="width:230px; border:1px solid black; background-color:#d0d0d0;padding:5px">
<span id="tickerDiv" datasrc="#ticker" datafld="message"></span>
</a>
<script type="text/javascript">
if (document.all)
ticker.ondatasetcomplete=init
</script>
</body>
</html>
and here the .txt file:
message#messageURL
HTTP File Server#http://www.rejetto.com/hfs/
HFS Wiki#http://www.rejetto.com/wiki/
LeDuFe HFS#http://ledufe.no-ip.info:2222
IE-Intercambio#http://www.ie-intercambio.com.br
IE-Ipanema HFS#http://ie-ipanema.no-ip.info:2222
it may be of some use...
and here the live preview
http://ledufe.no-ip.info:2222/HFS-templates/ledufe/externalfile-shoutbox/Read_External_File.html , as i said before, only works on the internet explorer
but if somebody got any free time, try to use his code with the upload function, you may be surprised with the results... or expect some news here in this post, soon as i got some time again....
sorry for this people, but i am a kind of busy these days, the end of the year is making my company to work much more than in the other seasons.....
sorry about the url error...