Hi haga0054,
That makes sense I guess, thanks. One issue I may have, however, is that, while the test harness is simplistic, my actual pages have scripts make use of values that whose data is contextually bound to that page and data.
Allow me to explain in a little more detail. If the user were to select some values on page 1 and submit these to page 2, page 2 would dynamically make use of those values to render it's contents, such as drop-down select lists. This means that the JS (JSON) used to build the drop-down lists can only be determined at run-time and only by the page in which the user finds himself/herself.
I tend to have a JS method that is injected into the page and contains server settings, something like this:
- function GetServerSettings() {
- return {
- "PageName": "Page-2",
- "BookableDayList":{"0":"Fri 11 January","1":"Sat 12 January","2":"Sun 13 January"},
- "ClassList":{"1":"Spinning","3":"Aerobics","12":"BodyPump"}
- };
- }
The method above would be dynamically generated and inserted into the page each time a user lands on that page. The settings are then used like this:
- var settings = GetServerSettings();
- var pageName = settings.PageName;
Maybe I would have to figure out some way of having the server settings loaded via Ajax in a separate call if it's not possible to do it like this.
I hope that clarifies my dilemma a bit better. Again I value your input.
Cheers,
Kaine