Pass by reference to COM object in JavaScript -
trying pass i
variable test
function must change value:
<html> <head> <title> welcome site</title></head> <body> <script language="javascript"> var atl = new activexobject("atl.object.1"); var =6; atl.test(i); document.write(i); </script> </body>
but in output still have 6
. how pass value reference?
on javascript pass reference not exist. can use object pass , works passing reference.
eg :
var atl = new activexobject("atl.object.1"); var = { value: 6}; //if activexobject not work object, need make adapter or store value atl.test(i); document.write(i.value);
Comments
Post a Comment