Bradford, who were unbeaten at home in the league last season on their way to the play-off final, have already lost seven games at Valley Parade this term.
O’Toole, 29, gave the visitors the lead in the 42nd minute, breaking free to score with a close-range header from Matt Grimes’ corner.
Long added a second in the 61st minute, taking advantage of hesitancy in the home defence to beat keeper Lukas Raeder with a shot just inside the near post.
Defender Matt Kilgallon had the ball in the net for Bradford after 37 minutes after keeper Richard O’Donnell failed to hold Paul Taylor’s free-kick, but was ruled offside.
Taylor pulled a goal back in stoppage time with a superb 25-yard shot but it was too late to save the game for the home side.
Northampton boss Hasselbaink said: “John-Joe O’Toole is a focal point for us. No one likes playing against him.
“At times it isn’t pretty, but it is effective. I thought he was immense today. He led the line and gave Chris Long some breathing space.
“I was very happy with our performance and even more so with the result.
“Especially in the first half I thought we bossed it and they didn’t have an answer. We looked really dangerous on the break and when we had the ball we controlled it.
“They changed their system in the second half and put defender Nat Knight-Percival up front to give them a bit more physicality, but we had pressure on the ball for 70 minutes and did well to score two goals.
“Our intensity dropped a little after that and it was squeaky bum time after they scored late on, but we pulled through, stuck together and managed to come out winners.”
Bradford manager Stuart McCall, who was without injured main striker and leading scorer Charlie Wyke, said: “I am not making excuses, but we are struggling with injuries.
“We had five players out today, who would be regular starters, including both first-choice full-backs and our build-up play is difficult without Charlie Wyke up front.
“They started better than us – we didn’t get out of our own half for the first 20 minutes – and both their goals were really poor goals from our point of view – we have got to defend better.
“In the second half we had enough opportunities to a get a point out of the game and Dom Poleon should have scored with the shot that hit the bar.”
England manager Gareth Southgate has claimed that the country needs to boot racism out of its own football before criticising World Cup hosts Russia.
Newcastle have been linked with a shock move for former Sunderland goalkeeper Simon Mignolet during the summer.