A novel time-frequency technique, called the synchrosqueezing transform (SST), is used to investigate the midterm periodic variations of magnetic fields on the solar surface. The Magnetic Plage Strength Index (MPSI) and the Mount Wilson Sunspot Index (MWSI), measured daily by the Mount Wilson . The short-, mid, and longer-term periodicities are represented and decomposed by the SST with hardly any mode mixing. This demonstrates that the SST is a useful time-frequency analysis technique to characterize the periodic modes of helioseismic data. Apart from the fundamental modes of the annual periodicity, ∼27 day rotational cycle and ∼11 year solar cycle, the SST reveals several midterm periodicities in the two magnetic activity indices, specifically, ∼157 day (i.e., Rieger-type periodicity), and ∼1.3 and 1.7 years. The periodic modes, with 116.4 and 276.2 day periodicity in the MPSI, with 108.5 and 251.6 day periodicity in the MWSI, and the 157.7 day periodicity in the two indices, are in better accord with those significant periodicities derived from the Rossby waves theoretical model. This study suggests that the modes are caused by the Rossby waves. For the 1.30 and 1.71 year periodicity of the MPSI, and the 1.33 and 1.67 year periodicity of the MWSI, our analysis infers that they are related to those periodicity with the same timescale in the interior of the Sun and in the high atmospheric layers.