text: what is permenant and complete solution of erectile dysfunction?   how erectile dysfunction is treated depends on what things are causing it. after your doctor checks you for medical problems and medicines that might cause erectile dysfunction, he or she may have you try a medicine to help with erectile dysfunction. some of these medicines are injected into your penis. other medicines are taken by mouth. not everyone can use these medicines. your doctor will help you decide if you can try them.