Page 1 of 1

JavaScript Variable issue

Posted: Sat Sep 14, 2013 1:42 pm
by Curt Dutilley

I keep getting variable is undefined. I have mapped the response to a javascript variable. When I test the service, it returns the correct data, but when i try to reference that javascript variable I keep getting an undefined error. Image


JavaScript Variable issue

Posted: Sat Sep 14, 2013 2:10 pm
by Igor

Hello,

Could you clarify please where do you try to reference javascript variable? The scope of a JS variable is the region in which it is defined. You can try to use localStorage variable.


JavaScript Variable issue

Posted: Sat Sep 14, 2013 2:21 pm
by Curt Dutilley

After I posted, I tried using local storage variable and now I am gettign null as a response. I am invoking the service "on complete" Image


JavaScript Variable issue

Posted: Sat Sep 14, 2013 3:27 pm
by Igor

You could try to do next:

  • remove "readprofileservice" service from screen;
  • "Automatically Create from Sample Response" on "Shift_UserProfile_read_service";
  • add service to screen;
    It should help.

JavaScript Variable issue

Posted: Sat Sep 14, 2013 11:04 pm
by Curt Dutilley

perfect, it worked. Thanks so much for your kind help!