[Javascript] Problems with strings...
Carlos
carlos at unica.cu
Wed May 2 15:51:19 CDT 2001
Hi, I'm new in the list and also I'm new in Javascript...I've got a few
questions...
First, when I write:
HREF = HREF.replace('\', '/');
I get an error of "incomplete string", how can I solve this?? I try
replacing quotes by ", but nothing happened, same error occurs...
Second, I use the Scripting.FileSystemObject object to load a file (of any
type), the code is as follow:
BinFile = Server.CreateObject("ADODB.Stream");
BinFile.Open();
BinFile.LoadFromFile(FileName);
BinFile.Type = adTypeBinary;
BinData = BinFile.Read();
BinFile.Close();
BinFile = null;
Response.Write(BinData);
This works ok, except that it displays "???" chars...I know that this is
because BinFile.Read() returns a Variant data, but I can't find anything
related to Variants type in my javascript's tutorial, so I have to convert
this variant (BinData) to a string, thus I can print it, but how can I do
that?? and in extension how can I convert a variant to a Byte value, in case
I've read 1 byte from the file: BinFile.Read(1)...
Thanks
More information about the Javascript
mailing list