refactoring for json and soap details + refresh website via ajax jquery