adding js programs using ajax and images from db