adding javascript to form