Answered by:
Getting JSON values?

Question
-
Hello :)
I have a resjson file called settings.resjson contains
{
"FirstTimeLoad" : "1",
"Name":"value2"
}and i made a page called welcome.html.. what i want to do is make this page check if the applications opens for the first time redirect to the settings.html page, if not redirects to default.html
with JavaScript it means accessing the settings.resjson and check if FirstTimeLoad is 1 so it can redirects to settings.html and in settings page i will have to set the value to 0 so next load for the app will redirect directly to default.html
I don't know how to do it, after a pretty long search in the Learn section i got nothing.. Any possible solution ? Thanks :-)
Sunday, March 4, 2012 12:28 PM
Answers
-
Hi Ahmed,
I have a solution but it does not involve your file. You must use the application settings. Application settings are designed to store your... application settings! This should be the way you store your settings. You would need to decide if you want this to be a local setting or a roaming setting depending on your application requirements.
This link should get you started:
-Jeff
Jeff Sanders (MSFT)
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, March 5, 2012 1:13 PM
- Marked as answer by Ahmed Nefzaoui Monday, March 5, 2012 3:26 PM
Monday, March 5, 2012 1:13 PMModerator
All replies
-
Any possible solution please? :/Sunday, March 4, 2012 1:54 PM
-
Hi Ahmed,
I have a solution but it does not involve your file. You must use the application settings. Application settings are designed to store your... application settings! This should be the way you store your settings. You would need to decide if you want this to be a local setting or a roaming setting depending on your application requirements.
This link should get you started:
-Jeff
Jeff Sanders (MSFT)
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, March 5, 2012 1:13 PM
- Marked as answer by Ahmed Nefzaoui Monday, March 5, 2012 3:26 PM
Monday, March 5, 2012 1:13 PMModerator -
Hello Mr. Jpsanders
Thank you very much for the solution I didn't know about it :)
Thanks a lot :)
Monday, March 5, 2012 3:28 PM -
My pleasure! That is what the forums are for!
Jeff Sanders (MSFT)
Monday, March 5, 2012 3:29 PMModerator