Loading ...
Sorry, an error occurred while loading the content.

Re: help needed for yui connection manager-see my code

Expand Messages
  • tssha
    ... src= http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js ... 1) Remove the document.write() in the callback; that alone should
    Message 1 of 4 , Apr 30 9:21 AM
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "gayu357" <gayu357@...> wrote:
      >
      > ill send u the code again.actully those all things u mentioned r their
      > in my code,but still its not working.
      > <html>
      > <head>
      >
      > <script
      > src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script>
      > <script
      >
      src="http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js"></script>
      > <script type="text/javascript">
      >
      > var object={
      >
      > var handleSuccess=function(request){
      > var response = request.responseText;
      > document.getElementById("Layer1").innerHTML = response;
      > }
      >
      > var handleFailure=function(request){
      > alert("status is " + request.status);
      > };
      >
      > var callback{
      > document.write("in callback");
      > success:object.handleSuccess,
      > failure:object.handleFailure
      > };
      > function getdata()
      > {
      > request=YAHOO.util.Connect.asyncRequest('GET',"yuiconn.php",
      > callback,null);
      > }
      > </script>
      > </head>
      > <body>
      > <a href="javascript:getdata();">click here</a>
      > <div id="Layer1"></div>
      > </body></html>
      >
      > layer1 id is present.yuiconn.php is php file tat retrives data frm
      > database.one more thing,im using yui css grids.
      > now tell me where am i wrong? thanks

      1) Remove the document.write() in the callback; that alone should
      throw a syntax error.
      2) You create your callback handlers as as object members, but you do
      not define the scope property in your callback.

      Regards,
      Thomas
    Your message has been successfully submitted and would be delivered to recipients shortly.