Return value for the wn.call

Hi Rusabh,

i am trying to return the value which is retreived from the server , but i am not able to get the value.

function get_value_from_server(){
wn.call({
    method:"webnotes.client.get_value",
    callback: function(r) { 
        return r;
    }
});
}
alert(
get_value_from_server());

but it is returning me some Object, instead of the Value.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Instead of alert, use console.log to inspect the object. I guess it should be {'message': 'your_value'}


On Wed, Sep 25, 2013 at 4:14 PM, Syed Qadeer <sd...@gmail.com> wrote:
Hi Rusabh,

i am trying to return the value which is retreived from the server , but i am not able to get the value.

function get_value_from_server(){
wn.call({
    method:"webnotes.client.get_value",
    callback: function(r) { 
        return r;
    }
});
}
alert(
get_value_from_server());

but it is returning me some Object, instead of the Value.



Note:



If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
Pratik Vyas
Ph: +919925239915
Google Profile : http://www.google.com/profiles/pdvyas
Please don't address queries to me. Others in the group can also reply!

On Wednesday, September 25, 2013 4:14:56 PM UTC+5:30, Syed Qadeer wrote:
Hi Rusabh,

i am trying to return the value which is retreived from the server , but i am not able to get the value.

function get_value_from_server(){
wn.call({
    method:"webnotes.client.get_value",
    callback: function(r) { 
        return r;
    }
});
}
alert(
get_value_from_server());

but it is returning me some Object, instead of the Value.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.