I need some help trying to prove an exercise in Introduction to Algebra by Cameron

Let R be a commutative ring with identity. Suppose I and J are ideals of R. Then there is a surjective R-module homomorphism from R/I to R/J if and only if I is a subset of J.

I'm able to prove if-part, but I'm having trouble with the 'only if'-part. I assume a surjective homomorphism exists, but I don't know how to use it. I guess I can't assume the construction I used in the if-part (that is, f(I+r)=J+r)?

I know the R-modules R/I and R/J are cyclic but I don't think a homomorphism maps the generator of one to the other (f(I+1)=J+1)? Could you point me in the right direction?