send mongodb commands by ajax