Passing options to JavaScript