Since you declared the variable inside the function, you can use it only inside the function.
The easiest solution is to declare a variable outside the function, for example var codes; function makeNormalRequest(){ .. } function response(obj) { codes = (obj.text) // codes was already declared on first line } function onClickLater(){ alert(codes) } Have in mind that since "var codes" is declared outside any scope, it's a global variable. You can also create global variable if you don't use "var" keyword at all. For example: function abc(){ def=1 } After you call abc, "def" will be a global variable which you can access everywhere else. On 16 fev, 02:49, Prashant Patil <prashantpandurangpa...@gmail.com> wrote: > function makeNormalRequest() { > var params = {}; > params[gadgets.io.RequestParameters.CONTENT_TYPE] = > gadgets.io.ContentType.TEXT; > var url = "http://onlinebuddy.110mb.com/pp.php"; > gadgets.io.makeRequest(url, response, params);}; > > function response(obj) { > var codes = (obj.text); > alert(codes); > > }; > > i taken some value from here in var codes not i need to save this value in > persistence using another function and same value of var "codes" > > On Mon, Feb 16, 2009 at 11:15 AM, eduardorochabr > <eduardoroch...@gmail.com>wrote: > > > > > Could you provide some code? You could paste your alert code. > > > On 14 fev, 06:04, "Always Dynamic!" <manjif...@gmail.com> wrote: > > > Hello Guides and members. > > > I need to set external data as a variable to save it in persistence > > > data storage. As i dont want to use query string to pass data! > > > > i can alert fetched data from remote server but cant use it while > > > saving it. why this is so any idea? > > -- > With best Regards. > Prashant aka > Orkuteerhttp://en.blog.orkut.com/2007/11/thanks-from-orkuteer.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com To unsubscribe from this group, send email to opensocial-orkut+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---