add javascript for attritute having multiple fields