Attached javascript to form