I think the problem arises because a VB SAFEARRAY is passed back from the
function BinaryRead, and of course javascript doesn't know how to handle
SAFEARRAY's.
I might have to use VBSCRIPT, except we wan't to change to an APACHE server,
so we wanted to keep it all javascript :-(
"johannes" <johannes@p...> wrote in message news:136456@j...
>
> Well, to be honest i dropped it since i had to finish up the project.
> Eventually i ended up using XML and writing UTF-16 encoded unicode-files.
> A collegue of mine pointed out that the stream object may be helpfull when
> you want to use binary data in Jscript. But i did not have the time to get
> into that [he used the stream object to read binary PDF data from and to
the
> database with Javascript, and that worked]
>
> As i said before, VBS seems to have way more possebilities when you have
to
> work with binary files.
> So if you really need it you could make 1 vbs file for handling these
binary
> forms.
>
> I know this wont help you, but maybe you feel better.
>
> if anyone has some ideas about binary data and Javascript, dont hesitate
to
> enlighten us ;)
>
> cheers, johannes
>
>
>
> ----- Original Message -----
> From: "Shane Poppleton" <shane_poppleton@h...>
> To: "javascript" <javascript@p...>
> Sent: Tuesday, January 15, 2002 23:57
> Subject: [javascript] Re: Request.BinaryRead(Request.Form().TotalBytes)
>
>
> > > Hi All,
> > >
> > > Im using JScript5.5 serverside (ASP). I want to recieve a binary
stream
> > > from a form and operate on the binary data. From what ive seen this is
a
> > > breeze in VBS, but Js gives me some preoblems. Has any of you
experiance
> > > with this, or can any of you point me in the right direction.
> > >
> > > I want to recieve a form (enctype="multipart/form-data")
> > >
> > > In ASP is say something like:
> > > var binForm = Request.BinaryRead(Request.Form().TotalBytes)
> > >
> > > Now when i Response.Write(binForm) (or Response.BinaryWrite)
> > > i get en error: An exception occurred.
> > > Or output like: binForm is not a sting (hell its not ;-)
> > > or: An unhandled data type was encountered
> > >
> > > When i do typeof(binForm) it returns 'unknown' as datatype.
> > >
> > > What i want to do it be able to recieve binary data (unicode) in write
> > it
> > > to file in its pure form.
> > >
> > > Any comments on operation on binary files are most welcome!
> > >
> > > Kind regards, Johannes
> > >
> > Have you solved this problem yet, i am doing the same thing and can't
> > parse the data with substring or indexof or anything because it isn't a
> > string, even if i do String(binData).substring(x,y), it doesn't work,
and
> > as you said typeOf(binData) = "unknown"
> >
> > Let me know how you went
> $subst('Email.Unsub').
> >
> >
>
>
>
>