A recently developed particle-hole dispersive optical model is applied to describe the cross sections of photoabsorption, direct + semidirect photoneutron and inverse reactions accompanied by excitation of the isovector giant dipole and quadrupole resonances in medium-heavy-mass spherical nuclei. The model is an extension of the standard and nonstandard versions of the continuum-random-phase approximation by including the spreading effect in a phenomenological way. It contains the following ingredients: the Landau-Migdal particle-hole interaction and a phenomenological mean field consistent with this interaction, isovector velocity-dependent forces taken in the simplest form and the imaginary part of an effective single-particle optical-model potential determining the corresponding dispersive part. All the model parameters are taken from the other data and from the description of photoabsorption, while the direct + semidirect photoneutron and inverse reactions are described without the use of specific adjustable parameters. Calculation results obtained for a few neutron-closed-shell nuclei are compared with the corresponding experimental data.