Weather.asmx web service from JavaScript- No output returns -


I call the web service from javascript and I pass the data as zip code 10007 (hard coded). Want to get some output data but when I run the code, the messages come in the alert, and then the alert pop up does not say that no data is returned, can someone edit the code to return a correct output is?

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Calling Web Service, jQuery & lt; / Title & gt; & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# btnCallWebService"). Click (function (event) {$ .ajax ({type: "POST", url: "http://wsf.cdyne.com Data: "Jason", Data: "10007", Success: Process Success, Error: Process Error});} / WeatherWS / Weather.Smx / GetCityWeatherByZIP ", ContentType:" Application / Jason; Charset = UTF-8 " } Process success (data, status, request) {alert ('success'); if (position == "success") $ ("# response"). Text ($ (req.responseXML). Result "). Text ()); Warning (req.responseXML);} Function Process Error (data, position, rick) {warning ('error' + data. Location); //alert(req.responseText + "" status);} & lt; / script> & lt; / head & & Lt; body & gt; & lt; h3 & gt; Web service calling with JQuery / AJAX & lt; / h3 & gt; & lt; input id = "btnCallWebService" value = "call web service" type = "Button" /> 

Have you enabled the CORS thesis when I have tested in firebug

cross- Orientation Block Request: Similar Genesis At Iti dislike reading the remote resource. This can be fixed by transferring resources to a single domain or enabling the Corrosion.

These links can help you



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -