<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>That's very interesting!!!</DIV> <DIV>You're first question is&nbsp;suitable for&nbsp;starters stadium, but the secont is surelly not</DIV> <DIV>I will answer you're first question:</DIV> <DIV>&nbsp;</DIV> <DIV>This: \ -sign, is escape character.</DIV> <DIV>so if you wan't to replace this character in a string you have to escape&nbsp;the first</DIV> <DIV>this way:</DIV> <DIV><BR><STRONG>HREF = HREF.replace('\\', '/')</STRONG>,<STRONG> </STRONG></DIV> <DIV>&nbsp;</DIV> <DIV>if you continue to have the same problem try to add this also:</DIV> <DIV>&nbsp;</DIV> <DIV>HREF = HREF.replace('\\', '\/'),&nbsp; I use it in html strings, maybe it is needed here to,</DIV> <DIV>&nbsp;like: </DIV> <DIV>var theDiv = "&lt;DIV id=someid style='some style'&gt;some text<STRONG>&lt;\/DIV&gt;"<BR></STRONG></DIV> <DIV>Cheers!</DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt Arial; FONT-COLOR: black"><B>From:</B>&nbsp;Carlos</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B>&nbsp;Wednesday, May 02, 2001 9:50 PM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B>&nbsp;Javascript List</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B>&nbsp;[Javascript] Problems with strings...</DIV> <DIV><BR></DIV>Hi, I'm new in the list and also I'm new in Javascript...I've got a few<BR>questions...<BR><BR>First, when I write:<BR>HREF = HREF.replace('\', '/');<BR>I get an error of "incomplete string", how can I solve this?? I try<BR>replacing quotes by ", but nothing happened, same error occurs...<BR><BR>Second, I use the Scripting.FileSystemObject object to load a file (of any<BR>type), the code is as follow:<BR>&nbsp;&nbsp;&nbsp; BinFile = Server.CreateObject("ADODB.Stream");<BR>&nbsp;&nbsp;&nbsp; BinFile.Open();<BR>&nbsp;&nbsp;&nbsp; BinFile.LoadFromFile(FileName);<BR>&nbsp;&nbsp;&nbsp; BinFile.Type = adTypeBinary;<BR>&nbsp;&nbsp;&nbsp; BinData = BinFile.Read();<BR>&nbsp;&nbsp;&nbsp; BinFile.Close();<BR>&nbsp;&nbsp;&nbsp; BinFile = null;<BR>&nbsp;&nbsp;&nbsp; Response.Write(BinData);<BR><BR>This works ok, except that it displays "???" chars...I know that this is<BR>because BinFile.Read() returns a Variant data, but I can't find anything<BR>related to Variants type in my javascript's tutorial, so I have to convert<BR>this variant (BinData) to a string, thus I can print it, but how can I do<BR>that?? and in extension how can I convert a variant to a Byte value, in case<BR>I've read 1 byte from the file: BinFile.Read(1)...<BR><BR>Thanks<BR><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><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></DIV>