Then Foles fumbled after sacked and Mike Jenkins recovered for a touchdown.

"Critical win for us," Garrett said. "I thought the effort was there. I thought we were focused the whole game. When you have success, you have to play through it, you have adversity, you have to play through it, and today was a good example of that."

In the final minutes, fans behind Dallas' bench unrolled a banner that read, "Andy, Quit, Your Team Has!"

Foles was 22 of 32 for 209 yards and one touchdown.

"Not good enough to win," Foles said. "I made some mistakes and I can't turn the ball over. That's the most important thing to win games."

Vick, the four-time Pro Bowl quarterback, has struggled this season and entered with 10 touchdowns and nine interceptions.

He looked like his old self on the first drive, finishing it by connecting with Riley Cooper for a 2-yard TD. Cooper's sensational one-handed grab on a fade route gave the Eagles their first points on their opening drive all season.

The fun was short-lived when Romo hit Felix Jones on an 11-yard TD pass. Dan Bailey kicked a 30-yard field goal to send the Cowboys into halftime with a 10-7 lead.

NOTES: Foles was the first Eagles rookie QB to throw a TD pass since AJ Feely in 2001. Brian Westbrook, a running back, threw one in 2002. ... The Eagles had won six straight division games, including a sweep of the Cowboys. ... Eagles WR Jason Avant left with a hamstring injury. ... Sims started 15 games for the Eagles in 2010 and had two sacks.