sample code with javascrite function