The former Northern Ireland international, who died last week, was remembered with a minute's applause and a video tribute following a career that saw him score more than 140 goals for the club.
On the pitch, however, the Bantams were looking for a response to the loss at Roots Hall and they started in positive fashion.
Mark McNulty and Nicky Law each had shots deflected for corners and Bradford twice appealed in vain for a penalty, with Hanson and McNulty both going down inside the area to no avail.
The hosts continued to press after the interval as Haris Vuckic and Law went close before the home side's pressure paid off in the 56th minute.
Vuckic's overhit cross from the right was kept in play by Mark Marshall, who clipped the ball into the area where Hanson scored with a header from close range.
However, Northampton came close to equalising when only a brilliant one-handed save by Colin Doyle kept out Alex Revell's header from Paul Anderson's cross, before substitute Marc Richards had the ball in the net in the 84th minute only to be ruled offside.
Report supplied by Press Association.
Match ends, Bradford City 1, Northampton Town 0.
Second Half ends, Bradford City 1, Northampton Town 0.
John-Joe O'Toole (Northampton Town) is shown the yellow card.
Romain Vincelot (Bradford City) wins a free kick in the attacking half.
Foul by Alex Revell (Northampton Town).
Nicky Law (Bradford City) is shown the yellow card.
Foul by James Hanson (Bradford City).
John-Joe O'Toole (Northampton Town) wins a free kick in the attacking half.
Substitution, Bradford City. Rory McArdle replaces Josh Cullen.
Substitution, Northampton Town. Alfie Potter replaces Paul Anderson.
Attempt missed. Alex Revell (Northampton Town) right footed shot from outside the box is too high.
Josh Cullen (Bradford City) wins a free kick on the right wing.
Foul by Raheem Hanley (Northampton Town).
Foul by Filipe Morais (Bradford City).
Matthew Taylor (Northampton Town) wins a free kick on the right wing.
Josh Cullen (Bradford City) wins a free kick on the left wing.
Foul by Marc Richards (Northampton Town).
Substitution, Bradford City. Jordy Hiwula-Mayifuila replaces Marc McNulty.
James Meredith (Bradford City) wins a free kick in the defensive half.
Foul by Paul Anderson (Northampton Town).
Attempt saved. Josh Cullen (Bradford City) right footed shot from outside the box is saved in the centre of the goal.
Filipe Morais (Bradford City) wins a free kick on the right wing.
Foul by David Buchanan (Northampton Town).
Corner,  Bradford City. Conceded by David Cornell.
Attempt blocked. Filipe Morais (Bradford City) right footed shot from outside the box is blocked.
Corner,  Bradford City. Conceded by David Cornell.
Attempt missed. Mark Marshall (Bradford City) right footed shot from outside the box is close, but misses the top left corner from a direct free kick.
Josh Cullen (Bradford City) wins a free kick in the attacking half.
Foul by Paul Anderson (Northampton Town).
Corner,  Bradford City. Conceded by Paul Anderson.
Attempt missed. Marc Richards (Northampton Town) header from the left side of the six yard box is close, but misses to the left.
James Hanson (Bradford City) wins a free kick on the right wing.
Foul by Rod McDonald (Northampton Town).
Foul by Filipe Morais (Bradford City).
John-Joe O'Toole (Northampton Town) wins a free kick in the attacking half.
Delay over. They are ready to continue.
Delay in match Alex Revell (Northampton Town) because of an injury.
Attempt saved. Alex Revell (Northampton Town) header from the centre of the box is saved in the bottom left corner.
Foul by James Hanson (Bradford City).
David Buchanan (Northampton Town) wins a free kick in the defensive half.
James Hanson was the match winner as Bradford bounced back from Saturday's defeat at Southend with a hard-earned home win over Northampton, on a night when the club paid tribute to their record goalscorer Bobby Campbell.