Friday, June 8, 2007

ADODB.Stream with JavaScript

<script>

function Button1_onclick() {


var octetStream;


var adoStream = new ActiveXObject("ADODB.Stream");

adoStream.Mode = 3; // read

adoStream.Type = 2; // adTypeTexy

adoStream.Charset = "ASCII";

adoStream.Open();

adoStream.LoadFromFile("ssd.txt");


 

octetStream = adoStream.ReadText();


 

alert(octetStream);

}

// ]]>

</script>

<input
id="Button1"
type="button"
value="button"
onclick="return Button1_onclick()"
/>

No comments: