[ 1 post ]

Andres Felipe

  • Username: felipe12357
  • Joined: Fri Jul 20, 2012 2:16 pm
  • Posts: 1
  • Offline
  • Profile

Error on using YAHOO.until.Connect.asyncRequest.

Post Posted: Fri Jul 20, 2012 2:23 pm
+0-
Hi, im tring to make a conection using that function, when i execute my code trying to connecting to a local page, it works well, my problem occurs when i try to connect to a remote page for example google, or yahoo

here is the code im using:

Code:

 <script src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script>
 
<script src="http://yui.yahooapis.com/2.9.0/build/event/event-min.js"></script>
 
<script src="http://yui.yahooapis.com/2.9.0/build/connection/connection_core-min.js"></script>
 
<script src="http://yui.yahooapis.com/2.9.0/build/connection/connection-min.js"></script>
<script>

var args = ['Med','10061986'];
 
var responseSuccess = function(o) {
   alert("salio bien" + o.responseText);
/* Please see the Success Case section for more
 * details on the response object's properties.
 * o.tId
 * o.status
 * o.statusText
 * o.getResponseHeader[ ]
 * o.getAllResponseHeaders
 * o.responseText
 * o.responseXML
 * o.argument
 */
};
 
var responseFailure = function(o) {
// Access the response object's properties in the
// same manner as listed in responseSuccessss( ).
// Please see the Failure Case section and
// Communication Error sub-section for more details on the
// response object's properties.
   alert("aca entro" + o.statusText );
};
 
var callback = {
  success:responseSuccess,
  failure:responseFailure,
  argument:args
};


//Initiate an asynchronous transaction.
var cObj = YAHOO.util.Connect.asyncRequest('GET','http://www.yahoo.com',callback);


 </script>




the message error that appears its: comunication error.

i hope someone can help me, Thanks!
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum