A. In general, you don't want to use a stimulant laxative, like Senokot, Bisacodyl, Dulcolax, Ex-Lax, or Castor Oil, for more than a week at a time. If you do use laxatives for a longer amount of time, it can lead to a dependence on using a stimulant laxative to have a bowel movement.
Instead of a simulant laxative, it is usually better to use a stool softener as a long term treatment for constipation. Keep in mind that dietary changes, including increasing the amount of fluids and fiber in your child's diet, are also important long term treatments for constipation. Getting her in the habit of trying to have a bowel movement once or twice a day is also an important part of any constipation treatment plan.
The fact that she is having 'frequent accidents' may also mean that she has encopresis, a complication of constipation. So maybe this has been going on for more than just two months.
If over the counter stool softeners aren't helpful, you might ask your Pediatrician about prescribing polyethyline glycol 3350, a tasteless and odorless powder that can be mixed with water, and which is helpful for many children with constipation.
Related Questions and Answersconstipation for more information and advice.