add Javascript sample code