[Javascript] Problems with strings...
BEKIM BACAJ
Trojani2000 at hotmail.com
Wed May 2 21:00:55 CDT 2001
That's very interesting!!!
You're first question is suitable for starters stadium, but the secont is surelly not
I will answer you're first question:
This: \ -sign, is escape character.
so if you wan't to replace this character in a string you have to escape the first
this way:
HREF = HREF.replace('\\', '/'),
if you continue to have the same problem try to add this also:
HREF = HREF.replace('\\', '\/'), I use it in html strings, maybe it is needed here to,
like:
var theDiv = "<DIV id=someid style='some style'>some text<\/DIV>"
Cheers!
----- Original Message -----
From: Carlos
Sent: Wednesday, May 02, 2001 9:50 PM
To: Javascript List
Subject: [Javascript] Problems with strings...
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
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript<br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010503/12511900/attachment.htm>
More information about the Javascript
mailing list