Page 3 of 3

Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 6:09 pm
by Tim5052033

The issue appears to be re-appearing when I add the follow JS to a localStorage response mapping:

var temp = JSON.stringify(value);
console.log(temp);
temp = localStorage.getItem('allPartTasks') + temp;
localStorage.setItem('allPartTasks', temp);

I'm trying to take the array of responses and append each (in text format) to a local variable for use on the next page where it's broken back up into objects.

Thanks,

Tim


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:02 pm
by maxkatz

Check in the console if all the rows are printed...


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:07 pm
by Tim5052033

They note - it seems that it's leaving a JS method and not starting the next one with - despite the event.


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:16 pm
by maxkatz

Leaving a JS method - what does it mean?


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:25 pm
by Tim5052033

I'm explaining this terribly. I had some errors in my javascript which was halting execution.

It's running to competition but I'm still getting the Grey box. It goes the moment I remove the javascript I mentioned above. Image


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:29 pm
by maxkatz

I think it's failing because you mapped an array to a single local storage variable and running JavaScript code. If you need to save the entire array into local storage, map it to a grid, then make the grid invisible. Add the JavaScript there.


Invoking Rest service causing page content to disappear

Posted: Thu Oct 04, 2012 8:31 pm
by Tim5052033

Makes sense. Will give it a try - thanks for the quick response Max. Really makes a huge difference when the frustration kicks in. Much appreciated.