I'd say it depends on what your health/exercise goals are, your physical condition (especially legs/knees), what you want the equipment to do, and what is your access to other equipment.
For runners, the elliptical is generally considered XT equipment that closely mimics running but without the impact. "Running" on an elliptical, however, is not running because of that difference in impact. It may prepare your legs for motion, but it will not prepare you for pounding the pavement. That's why an elliptical is great for XT, for keeping your HR up & for working the legs, but isn't a substitute for running if you're training for a race and especially a distance race. (Although many people, myself included, use the elliptical as a central part of our training programs.) However, with the right elliptical trainer--and by this I mean one that has you working your upper body as well as your lower body--you can get a good workout that will condition your body & supplement your RWs outdoors.
A TM will help prepare you for running outdoors much more closely, although it is easier on your knees than the pavement/sidewalk. (It's also harder on your knees than the elliptical.) While it's true that the TM might do some of the "work" for you, as a PP noted, any TM that provides you with the ability to set an incline can offset the machine's effort & have you work harder. Although most running/race training programs tell you that you cannot train for a long-distance race entirely on a TM, that's debatable. Both my partner & I trained for Goofy 2008 on a TM 90% of the time and we both finished & finished well for our respective goals. (He's ran, I RW.) We've also trained for other events in this way, so using the TM to train wasn't a one-time shot. A TM, though, does not give your upper body the workout a good elliptical or other piece of XT equipment would, plus working out extensively on a TM involves high-impact on joints.
Ultimately, I agree with all the PPs who suggested you "try before you buy." I suggest getting a one-day or one-week membership to a gym & take the tour. Ask questions of the trainers about what one piece of equipment you should use for your situation. Ask them for brand/store recommendations. I've never met a trainer who wouldn't be delighted to answer your questions, and without the vested interest some (not all) salespeople have.
One last question: why choose home equipment over a gym membership, where you could have both? Even a temporary gym membership might give you the experience with both an elliptical & a TM that would allow you to make the decision that best fits your needs. (I can think of many reasons, your location, your work schedule, your comfort level in a gym, health reasons...it's more or less a rhetorical question for you to consider before buying.)