Janaba During the Fast
Question :

If I am fasting and I slept and had ejaculated semen, what do I do so my prayers will not be invalid?

Answer :

You should perform the ghusl of janaba before you can pray, and the fast is not affected.

Masturbation
Question :

Does masturbation during the month of Ramadan void the fast if it does not end with ejaculation?

Answer :

If he intended to break the fast by such an act, his fasting is invalidated and he should make it up and pay the kaffara. If he did not intend to break the fast, His fasting is not void. In any case, it is prohibited for the individual to masturbate even if it does not end with ejaculation. One is required to seek the forgiveness from Almighty Allah and repent to Him.