How to convert a byte array from ActiveX control to an Array object



Hello Everyone,

In my javascript, an ActiveX control returns a byte array, say block. But by
any means I just can not access it. The typeof operator says its time is
unknown, any call to this object will fail, either toArray or toString. Of
course, indexing by [] will fail. Then I tried type casting in the way I
know:

var test = (Object) block;
var test = (Array) block;
var test = (byte[]) block;
var test = (Object[]) block;
var test = (String)block;

But seems javascript doesn't support casting in that way. So I tried to
contruct object from that:

var test = new Object(block);
var test = new Array(block);
var test = new String(block);

But none of above let me access the bytes inside the array.

Is there anyone successed in getting a byte array from an ActiveX control?

Thanks,
Lei Lei Shi

.



Relevant Pages

  • Re: How to convert a byte array from ActiveX control to an Array object
    ... In my javascript, an ActiveX control returns a byte array, say block. ... var test = block; ... Is there anyone successed in getting a byte array from an ActiveX control? ...
    (comp.lang.java.programmer)
  • Re: .join() !== + a + b; // for some a and b
    ... This is a situation that is probably all too common in many, if not most, programming languages, where slips in the construction of an expression result in an alternative expression, rather than a syntax error. ... There are languages where assignment would not be allowed in that context, but in javascript assignment is an expression and all expressions are allowed to drive - if - statements. ... The consequence of missing the comma out is that two expressions that would each define one element in an array become a single expression, ... The use of the comma operator in the expression in the property accessor's brackets may make the outcome more obscure but it still does not prevent the whole expression from being valid. ...
    (comp.lang.javascript)
  • Re: help with arrays
    ... You're too kind, Trevor. ... A JavaScript object is basically ... is using an array of images, combined with an array of URLs, to build ... This is the code that is behind the arrow ...
    (microsoft.public.frontpage.programming)
  • Re: Array in javascript
    ... The only danger is of wasting ones time as your intellectual ... exhibiting 'jaggedness' created with a single javascript Array instance ... IF THEN (NOT a single Array object) ... When you announced last week that one month of studying Mozilla ...
    (comp.lang.javascript)
  • Re: Very Strange problem with my AJAX code
    ... The php routine that is called interrogates the database, cereates an array and then uses that array to build the message that is sent back to the receiving javascript code. ... you don't show what's in $charges; your problem could very well be before this. ...
    (comp.lang.php)

Loading