Laxatives such as Dulcolax can be helpful for dogs with constipation. However, it might be detrimental for those who have bowel obstruction, so it is recommended to consult a veterinarian before giving your dog laxatives. Lactulose is another option, but similarly, it has to be prescribed by a veterinarian. You can also try to ensure that your dog gets enough fluids, fiber, and exercise to prevent constipation from reoccurring. For more information on the treatment options for constipation in dogs, you can visit here: http://pets.webmd.com/dogs/constipation-dogs-causes-treatments?page=2
It is always best to take your dog to the vet if they are having intestinal issues. Some people have had success with giving their dog a little bit of canned pumpkin. If the dog does not improve in a day or so being the dog to your veterinarian.