I am trying to create an event tracker. As you can see in my screenshots below. You will select a world (server) and a map. The selections are saved to their own local storage variables, and clicking on submit will be directed to the next page. Ignore everything under the first submit button. This next page is where I am trying to show the status of current events for the previous selections. So now on page load a rest service is called that takes the selections that where saved to local storage variables and inputs them into a request parameter now on service response I am sent back a list of event ids. Now these ID's I am saving under my local storage variable Event_ID. You have provided me code to save them into an array. Now this is my hangup, I have an entire database of these event_ids now I need to send, or search my database for these exact 8 event ids and grab information from a corresponding field. In this case EventName and then list it back to the page, under a label or list field. I added the code you provided to the where response.
var event_id;
try {
event_id = JSON.parse(localStorage.getItem("event_id"));
if ({}.toString.call(event_id) !== "[object Array]") {
event_id = [];
}
} catch ( e ) {
event_id = [];
}
I am not sure that is right....? I now get a list of all events in my database. What I am trying to figure out is how to send these unique event ids back to the database whether through, query, read, I am not sure I am assuming query is the best solution here. My issue is can the query handle 8 unique ids or would it be necessary to call the service 8 separate times to handle the information. Or am I going about this process all wrong. Because depending on the server map selection you may have x amount of keys to pull information from the database.
inline.png?1391911326[/img] [/url]