invoking js code