"With less than three months to go before the election, a lot of people are still trying to square Sen. Obama's varying positions on the surge in Iraq. First, he opposed the surge and confidently predicted that it would fail. Then he tried to prevent funding for the troops who carried out the surge," McCain said.
"Not content to merely predict failure in Iraq, my opponent tried to legislate failure."
Obama has acknowledged the surge reduced violence in Iraq but says it has failed in its political goal of facilitating a reconciliation among contentious Iraqi factions. The Illinois Democrat proposes to withdrawn U.S. combat forces from Iraq within 16 months; McCain opposes any timetable for withdrawal.
Iraqi leaders have been pressing the U.S. for a timetable for withdrawal.
"It is hard to understand how Sen. McCain can at once proclaim his support for the sovereign government of Iraq, and then stubbornly defy their expressed support for a timeline to remove our combat brigades from their country," said Obama campaign spokesman Bill Burton. "John McCain is intent on spending $10 billion a month on an open-ended war, while Barack Obama thinks we should bring this war to a responsible end and invest in our pressing needs here at home."
McCain said victory in Iraq is in sight, but much depends on the next president's judgment.
"The lasting advantage of a peaceful and democratic ally in the heart of the Middle East could still be squandered by hasty withdrawal and arbitrary timelines. And this is one of many problems in the shifting positions of my opponent, Sen. Obama," McCain said.
The Republican nominee-in-waiting said Obama's political ambitions have blinded him to reality. He also said Obama has refused to change his positions to reflect new success.
"Even in retrospect, he would choose the path of retreat and failure for America over the path of success and victory," McCain said. "In short, both candidates in this election pledge to end this war and bring our troops home.
"The great difference is that I intend to win it first."
Obama was scheduled to speak with the veterans on Tuesday. President Bush plans to attend on Wednesday.
At a later event along Florida's Space Coast, McCain criticized Obama's initial plan — since abandoned — to pay for part of his $18 billion education program by delaying NASA's Constellation Program, which is developing the vehicle and rockets to go to the moon and later to Mars. His campaign has since taken that cut off the table.
"Sometimes it's difficult to know what a politician will actually do once in office because they say different things, at different times, to different people," McCain said in Cocoa Beach, standing beside Republican Sen. Mel Martinez of Florida and Independent Sen. Joe Lieberman of Connecticut. "This is a particular problem when a candidate has a short, thin record on the issue, as is the case of Sen. Obama."
McCain and Obama remain in a tight race here. Polls show the contest is within the margin of error despite Obama's expenditure of millions of dollars on television advertising.
Later Monday, McCain planned a fundraiser in Atlanta.