Javascript conversion


#1

I am trying to understand why the following Basic code (for example) is not converted correctly:

Dim x
Dim MASS_ONOFF
x = MASS_ONOFF

becomes

var x;
var MASS_ONOFF;
x = MASS.ONOFF;

and

Dim x, y
y= “abc_def”
x = Replace(y, “_”, “”)

becomes

var x,y;
y= “abc_def”;
x = Replace(y, “” , “_”);


#2

It’s the underscores. It has to do this for expressions like Button1_onclick, which get (correctly) translated to Button1.onclick().

You’ll need to call MAS_ONOFF something else.