Unplug the lamp. Lay it on its side on a work table. Using diagonal pliers, cut the cord off of the lamp 3 inches from the lamp.
Unscrew and remove the screws that hold a plate to the bottom of the lamp, using a screwdriver.
Pry loose the rubber grommet -- the rubber circle that the cord passes through -- with the screwdriver. Find the grommet on the lamp base where the cord enters the lamp; this is typically the area that causes a lamp to short out.
Reach in with the screwdriver. Loosen three screws -- don't remove them -- that hold the wires onto the lamp. You may find three horseshoe-type fittings under the screws, on the posts, or just bare wires. When they come loose, pull the wires off. Pull the remaining piece of wire and the grommet out of the lamp base.
Strip the rubber coating off the end of the long cord that you cut off. Use wire strippers to strip the wires down identically, using the short piece that you unscrewed for a model.
Slide a new rubber grommet onto the cord. Insert the cord through the hole where the old cord came out. Pull the cord through the lamp base far enough so that the stripped end will be in contact with the posts where the old piece came off.
Screw the stripped ends of the wires back onto the posts and tighten the screws. Use your fingers to force the rubber grommet back into the hole. Screw the base back on the lamp.