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

http://www.mydomain.org/wcfservices/Restful/svcEmailRestful.svc/SendEmail?name=Afshin&email=afshin@tek.com&phone=416-444-4444&subject=subject&message=message&joinmailinglist=Y&howdidyoufindus=google&sendmyselfacopy=true"

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

$.ajax({

"POST" ,

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

,

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

,

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

,

dataType :"json"

,

processdata :true

,

success:function

() {

alert('go it: '

); },

error:function

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

thanks, in advanced

type :