I looked it up on Wed MD and this is what I found (it's rather lengthy but hopefully useful information):
Question:
My toddler has been constipated for days. What can I do short of taking her to the doctor?
Answer:
The goal is to help your child to have soft, comfortable stools again. In toddlers, constipation is almost always related to diet, so a step-by-step approach that targets what she eats and drinks is the best way to treat this condition:
1. Make sure your child is drinking enough fluids -- juice, milk and water. If your child is dehydrated, her stool will become harder, leading to constipation. It is particularly important for your child to stay hydrated in hot weather. Since it's difficult to make specific recommendations as to how much fluid is enough, try following the pediatricians' rule of thumb: If your child is urinating at least every three hours while awake, then she's probably getting plenty of fluids.
2. Increase your child's fiber intake. Many fresh fruits and vegetables are high in fiber. The United States Department of Agriculture recommends three servings of vegetables and two servings of fruit daily for 2- to 6-year-olds. This may seem an impossible goal to meet if you've got a picky eater, but not all high-fiber foods taste "yucky." Prunes and raisins are particularly high in fiber. In addition, fiber breakfast bars and cereals, bananas, apples, peas, grainy breads and peanut butter (which does not cause constipation, but actually helps prevent it) are all good choices.
In addition, supplemental fiber preparations such as Metamucil, Fiberall and Citrucel can be helpful as they make the stools absorb more water, allowing them to move gently through the intestines.
3. Try giving your child mineral oil. This remedy is somewhat controversial, but in my practice, I've found it's one of the best treatments and is generally safe. Mineral oil coats the stool and helps it slide easily through the intestines. At one time, it was thought that it blocked the absorption of important minerals through the intestinal wall, but this was recently found not to be the case. In rare instances, it has caused pneumonia, but only in children who were unable to swallow properly.
I recommend that parents start by giving their child 2 teaspoons of mineral oil twice a day, for a 20- to 30-pound toddler. Thereafter, increase the dosage by 1 teaspoon every other day until the child is passing soft stool and any anal fissures have healed. (Mineral oil tastes awful, but it can be well-disguised in shakes, juice, Jell-O and ice cream.)
4. Encourage your child to sit on the toilet after meals. Children who have experienced painful bowel movements are often reluctant to sit on the toilet. But the longer a child avoids going to the bathroom, the harder the stool will become. You can help break this cycle by having the child sit on the toilet for 5 or 10 minutes after meals, when intestinal reflexes make passing bowel movements easier.
5. Consider eliminating milk from your child's diet. On occasion, a child can become constipated due to a cow's milk allergy or sensitivity. However, because cow's milk is an excellent source of protein and calcium, which are both essential for growth, you should not eliminate it from the diet without first consulting your doctor. If you have tried the above strategies without success and feel that milk may be the culprit, contact your pediatrician.
Don't give your child an over-the-counter laxative. Laxatives should be used rarely, if at all, in children and can cause serious problems such as electrolyte imbalances. Only a doctor can determine if this level of treatment is needed.
Do consult your doctor if constipation develops suddenly or is associated with pain or fever.
Don't worry if there is a small amount of blood on the surface of the stool or the toilet tissue. This probably indicates an anal fissure, a painful but non-serious condition. Larger amounts of blood, blood mixed with the stool, or blackening of the stool, however, may indicate a more serious condition.
Do contact your doctor if constipation develops in early infancy -- this might indicate a more serious condition, such as intestinal blockage, and should be evaluated quickly.