Schaub went 16-for-29 with 192 yards while Foster finished the game with 16 carries for 131 yards and a score and three catches for 56 yards and a touchdown for the Texans (3-1), who bounced back from last Sunday's loss to Dallas.
Bruce Gradkowski went 24-for-39 with 278 yards, two touchdowns and two interceptions while Zach Miller finished with 11 catches for 122 yards and a score for the Raiders (1-3), who have dropped two straight after defeating St. Louis.
With the score tied at the start of the second half, Houston quickly took the lead. On the second play of the opening drive, Foster took a handoff around the right side, broke a tackle along the sideline and raced into the end zone from 74 yards out for a 21-14 lead just 44 seconds in.
After forcing a punt on Oakland's next touch, the Texans went on a 13-play, 73-yard drive that ate up over 7 1/2 minutes of the clock. They capped it with a 35-yard field goal from Neil Rackers for a 24-14 lead with 2:35 to play in the third quarter.
Gradkowski was picked off by Troy Nolan on the first play of Oakland's ensuing drive and the Texans took advantage of the turnover. On the first play of the fourth quarter, Schaub hit Foster near the end zone, and Foster got across the goal line to complete the 10-yard play for a 31-14 lead.
However, Oakland answered four minutes later. The nine-play, 87-yard march was capped by a 14-yard reception in the end zone by Miller to make it a 31-21 game.
The Raiders held the Texans on their next touch and were able to make it a one-score game, as Sebastian Janikowski booted a 39-yard field goal with 6:13 to play.
The Oakland defense again did its job, forcing a punt from Houston, but Gradkowski was picked off by Nolan for a second time and Houston killed the rest of the clock.
The Raiders got a 64-yard kickoff return from Jacoby Ford to start the game in excellent position, but went three-and-out and the Texans promptly took the lead.
A 29-yard catch by Dreessen was followed by a 13-yard catch from Kevin Walter to get the Texans in Oakland territory. Three plays later, Ward took a handoff through the right side, broke a tackle and raced into the end zone for a 7-0 lead with 10:06 left in the first quarter.
Oakland, though, came right back to tie the game. The Raiders covered 80 yards in eight plays, with Michael Bush punching the ball into the end zone with a two-yard run up the middle with 6:14 left in the first.
After an exchange of punts, the Texans took the lead after starting with the ball in Oakland territory. Steve Slaton carried the ball 23 yards to get it to the Oakland 13, and on third down, Schaub dumped a quick pass over the middle to Dreessen for an 11-yard score and a 14-7 lead with 23 seconds left in the first.
The Raiders tied the game with an impressive drive in the second quarter. Gradkowski completed a pass to Miller for 17 yards to get the ball across midfield, and later hit a wide-open Marcel Reece in the right flat. Reece took it in untouched from 13 yards out with 6:50 on the clock.
Oakland was driving at the end of the half and in scoring position, but Gradkowski was stripped of the ball and Houston recovered at its own 40.
The Texans got to the Oakland 28 and lined up for a 46-yard field goal, but Rackers hit it off the right upright as time expired.
Bush finished the game with seven carries for 40 yards, while Darren McFadden had 12 carries for 47 yards and six catches for 82 yards for Oakland...Houston wide receiver Andre Johnson was inactive due to a right ankle sprain...Houston has won five of the six games against Oakland...Houston, which has won four straight on the road, hosts the Giants next Sunday...Oakland hosts San Diego next Sunday.