<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Показ данных из txt файла при помощи js!]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7718&amp;type=atom" />
	<updated>2012-10-21T07:42:30Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7718</id>
		<entry>
			<title type="html"><![CDATA[Re: Показ данных из txt файла при помощи js!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64935#p64935" />
			<content type="html"><![CDATA[<p>Ребят большое человеческое спасибо! Всё работает!</p>]]></content>
			<author>
				<name><![CDATA[feniks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28856</uri>
			</author>
			<updated>2012-10-21T07:42:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64935#p64935</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Показ данных из txt файла при помощи js!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64934#p64934" />
			<content type="html"><![CDATA[<p>&lt;html&gt;<br />&lt;script language=&quot;JScript&quot;&gt;<br />function ld() {<br />&nbsp; &nbsp; var fname = &quot;test.txt&quot;<br />&nbsp; &nbsp; var fso = new ActiveXObject(&quot;Scripting.FileSystemObject&quot;);<br />&nbsp; &nbsp; if (!fso.FileExists(fname)) return;<br />&nbsp; &nbsp; var f = fso.OpenTextFile(fname, 1, &quot;True&quot;);<br />&nbsp; &nbsp; while (!f.AtEndOfStream) {<br />&nbsp; &nbsp; uDiv.innerHTML+=f.ReadLine()+&quot;&lt;br&gt;&quot;;<br />&nbsp; &nbsp; }<br />}<br />&lt;/script&gt;<br />&lt;body onload=&quot;ld()&quot;&gt;<br />&lt;div id=&quot;uDiv&quot;&gt;&nbsp; <br />&lt;/div&gt;<br />&lt;/body&gt; <br />&lt;/html&gt;</p>]]></content>
			<author>
				<name><![CDATA[Ottiwell_Wood]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26902</uri>
			</author>
			<updated>2012-10-21T07:23:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64934#p64934</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Показ данных из txt файла при помощи js!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64933#p64933" />
			<content type="html"><![CDATA[<p>Спасибо за ответ! Список состоит из текстовых строк! А если в test.txt лежит вроде такого?</p><p>&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст&lt;br&gt;текс&gt;tgm текст&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст1&lt;br&gt;текс1&gt;tgm текст1&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст2&lt;br&gt;текс2&gt;tgm текст2&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст3&lt;br&gt;текс3&gt;tgm текст3&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст4&lt;br&gt;текс4&gt;tgm текст4&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст5&lt;br&gt;текс5&gt;tgm текст5&lt;/a&gt;<br />&lt;a href=&quot;http:cssglobe.com&quot; class=&quot;tooltip&quot; title=&quot;текст6&lt;br&gt;текс6&gt;tgm текст6&lt;/a&gt;</p>]]></content>
			<author>
				<name><![CDATA[feniks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28856</uri>
			</author>
			<updated>2012-10-21T06:13:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64933#p64933</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Показ данных из txt файла при помощи js!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64931#p64931" />
			<content type="html"><![CDATA[<p>Не понятно как выглядит &quot;весь список из test.txt&quot;. Если как-то так:<br /></p><div class="codebox"><pre><code>One
Two
Three</code></pre></div><p>то HTA может выглядеть примерно так:<br /></p><div class="codebox"><pre><code>
&lt;html&gt;
&lt;script language=&quot;JScript&quot;&gt;
function ld() {
	var fname = &quot;test.txt&quot;
	var fso = new ActiveXObject(&quot;Scripting.FileSystemObject&quot;);
	if (!fso.FileExists(fname)) return;
	var ul = document.getElementById(&quot;ul&quot;);
	var f = fso.OpenTextFile(fname, 1, &quot;True&quot;);
	while (!f.AtEndOfStream) {		
		var t = document.createTextNode(f.ReadLine());
		var li = document.createElement(&#039;li&#039;);
		var n = ul.appendChild(li);		
		n.appendChild(t);
	}
}
&lt;/script&gt;
&lt;body onload=&quot;ld()&quot;&gt;
&lt;ul id=&quot;ul&quot;&gt;  
&lt;/ul&gt;
&lt;/body&gt; 
&lt;/html&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[dab00]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27085</uri>
			</author>
			<updated>2012-10-21T05:32:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64931#p64931</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Показ данных из txt файла при помощи js!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64902#p64902" />
			<content type="html"><![CDATA[<p>Привет всем! <br />Есть вопрос! Помогите если кто знает!Буду очень рад!<br />Сам вопрос...<br />Есть текстовый файл (к примеру test.txt) и файл hta(к примеру test.hta). Как вывести весь список из test.txt и показать его в test.hta(допустим в тег &lt;ul&gt;)<br />Заранее всем большое спасибо! Буду очень рад вашим ответам!</p>]]></content>
			<author>
				<name><![CDATA[feniks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28856</uri>
			</author>
			<updated>2012-10-20T17:05:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64902#p64902</id>
		</entry>
</feed>
