Adding page details using ajax calls