> Will this help? Watch for word-wrap.

Signature
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
><--snip-->
>
>> Will this help? Watch for word-wrap.
>
><--snip-->
>> function fetch(sURL) {
>> var sTXT = "";
[quoted text clipped - 8 lines]
>> return sTXT;
>> }
>Did you test it in anything other than IE?
>The group FAQ covers this very thing.
Which section? Honest, I did check the FAQ. All I found was
section "4.3 -- How can I access the client-side filesystem?"
Eventhough I need to access the server-side, I followed the link to
http://msdn.microsoft.com/library/en-us/script56/html/jsobjFileSystem.asp
which gives a JScript example of creating/writing on the local drive.
I didn't see anything like McKirahan's example, which also showed
how to use <SPAN>.
I would rather not use ActiveX, since it is often disabled. And
I would really prefer something that worked with more than IE.
But I appreciate any help, I'm a complete newbe.
Thanks
pennig@gmail.com - 30 Dec 2004 14:50 GMT
> Which section? Honest, I did check the FAQ. All I found was
> section "4.3 -- How can I access the client-side filesystem?"
>
> Eventhough I need to access the server-side, I followed the link to
http://msdn.microsoft.com/library/en-us/script56/html/jsobjFileSystem.asp
> which gives a JScript example of creating/writing on the local drive.
>
[quoted text clipped - 6 lines]
>
> Thanks
http://jibbering.com/2002/4/httprequest.html
Try that. It explains how to use the XMLHttpRequest object, and also
gives an example on how to incorporate the ActiveX (blech) method.
Randy Webb - 30 Dec 2004 21:54 GMT
<--snip-->
>>Did you test it in anything other than IE?
>>The group FAQ covers this very thing.
>
> Which section? Honest, I did check the FAQ. All I found was
> section "4.3 -- How can I access the client-side filesystem?"
4.34 although the wording is elusive.
<FAQENTRY>
Why does 4.34 no longer mention reading files from a server?
</FAQENTRY>
> Eventhough I need to access the server-side, I followed the link to
> http://msdn.microsoft.com/library/en-us/script56/html/jsobjFileSystem.asp
> which gives a JScript example of creating/writing on the local drive.
>
> I didn't see anything like McKirahan's example, which also showed
> how to use <SPAN>.
McKirahan's "solution" also lacked the ability to work in any browser
other than IE. Thats the problem with the example.
> I would rather not use ActiveX, since it is often disabled.
So is script, so are you going to forego scripting also?
> And I would really prefer something that worked with more than IE.
The HTTPRequest Object works with more than IE. Just not the way the
example was written. The page that the FAQ links to in Sec 4.34 explains
how to use it, and in a cross-browser way.

Signature
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Ron Beitel - 30 Dec 2004 23:16 GMT
>><--snip-->
>>
[quoted text clipped - 15 lines]
>I would rather not use ActiveX, since it is often disabled. And
>I would really prefer something that worked with more than IE.
I tested this with IE6, Netscape7.1, FireFox0.9 and Mozilla1.01(linux)
<html><head>
<title>swap_text.html</title>
<script type="text/javascript">
function display_dataset(dset) {
document.images.swap_grph.src = "/graphs/"+dset+".jpg";
document.getElementById("swap_text").src = "/textfiles/"+dset+".txt";
}
</script>
</head>
<body onload="display_dataset('data1')">
<table>
<tr><td>
<img name="swap_grph" src = "">
</td></tr>
<tr><td>
<iframe id="swap_text" src = "" WIDTH=500 HEIGHT=300></iframe>
</td></tr>
<tr><td>
<form>
<input type="button" value="One" onclick="display_dataset('data1')"/>
<input type="button" value="Two" onclick="display_dataset('data2')"/>
<input type="button" value="Three" onclick="display_dataset('data3')"/>
<input type="button" value="Four" onclick="display_dataset('data4')"/>
<input type="button" value="Five" onclick="display_dataset('data5')"/>
</form>
</td></tr>
</table>
</body></html>
I would give the chart and data table files the same name. Instead of
piechart1.jpg and data_table1.txt, rename them data1.jpg and data1.txt
If this is not possible change the function to accept two parameters, so
you can call it with explicit filenames...
onclick="display_dataset('piechart1.jpg','data_table1.txt')"
Ron Beitel - 31 Dec 2004 05:16 GMT
>I tested this with IE6, Netscape7.1, FireFox0.9 and Mozilla1.01(linux)
>
[quoted text clipped - 37 lines]
>you can call it with explicit filenames...
> onclick="display_dataset('piechart1.jpg','data_table1.txt')"
Problem! Each time a new <iframe> loads, it is a new page. So the brower's
BACK button shows the previous data table, but the graph does not change.
Anyone have any suggestions?