The effects of magnetic and electric fields on the infrared-absorption properties associated to transitions between the 1s-like and 2${\mathit{p}}_{\ifmmode\pm\else\textpm\fi{}}$-, 3${\mathit{p}}_{\ifmmode\pm\else\textpm\fi{}}$-, and 4${\mathit{p}}_{\ifmmode\pm\else\textpm\fi{}}$-like excited states of hydrogenic donors in GaAs-${\mathrm{Ga}}_{1\mathrm{\ensuremath{-}}\mathit{x}}$${\mathrm{Al}}_{\mathit{x}}$As quantum wells are studied. The magnetic and electric fields are applied along the growth direction of the heterostructure, and donor envelope wave functions and energies are obtained within a variational procedure in the effective-mass approximation. Calculations for the intradonor transition strengths for x-polarized radiation and absorption coefficients are performed for finite-barrier potentials and as functions of applied magnetic and electric fields and quantum-well thicknesses. A discussion of a sum rule associated to donor transitions in quantum wells is presented. Theoretical results for the absorption spectra are in good agreement with available infrared-magnetospectroscopy measurements on doped quantums wells. \textcopyright{} 1996 The American Physical Society.