conditional to the javascript