consume restful

Jun 26, 2012 at 4:52 AM

hi guys, i have a restful webservice which it works fine when i use it in browser like below url"

but when i try to call it with below code in jquery it is not working, do know what i am missing here,


"POST" ,

contentType :"application/json; charset=utf-8"


url :"http://server-pc/wcfservices/Restful/svcEmailRestful.svc/SendEmail"


data :'{"name":"Afshin", "email":"", "phone":"416-", "subject":"subject", "message=message", "joinmailinglist=Y", "howdidyoufindus":"google", "sendmyselfacopy":"true"}'


dataType :"json"


processdata :true



() {

alert('go it: '

); },


(xhr) {alert('error: ' + xhr.responseText); }});

thanks, in advanced

type :