Call the director of the homeowner's association if there is a formal organization for your neighborhood. Many subdivisions built within the past 40 years have restrictions on what may or may not be added to property and fences often require approval from the association.
Contact the zoning commission office for your town, city, or county and explain what you are considering. The zoning commission is responsible for approval of all additions to homes and can tell you what municipal requirements you'll need to meet to put up a fence.
Seeking a neighbor's approval may be part of the requirements from either or both the association and zoning committee. If approached with the idea that the fence will also benefit his home, a neighbor might want to contribute to a portion of its cost.