Most standard slimline floppies use a high density version of a standard floppy connector, and standard slimline CDRoms use standard IDE connectors. However many laptop CDRoms arn't 'standard' and use something proprietary but will have the equivalent of 40-pin IDE leads in some sort of order.
Carefully check before buying! It could be dead easy, or it could be near impossible ;-)