Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@

<div id="content">
<p>
The following values are determined sever-side on the first request.
The following values are determined server-side on the first request.
As the server has no location information to work from, these
values will all be unknown:
</p>
<dl>
<dt><strong>Country</strong></dt>
<dv>${county.hasValue() ? county.getValue() : "Unknown: ".concat(county.getNoValueMessage())}</dv>
<dd>${country.hasValue() ? country.getValue() : "Unknown: ".concat(country.getNoValueMessage())}</dd>
<dt><strong>State</strong></dt>
<dv>${state.hasValue() ? state.getValue() : "Unknown: ".concat(state.getNoValueMessage())}</dv>
<dd>${state.hasValue() ? state.getValue() : "Unknown: ".concat(state.getNoValueMessage())}</dd>
<dt><strong>County</strong></dt>
<dv>${country.hasValue() ? country.getValue() : "Unknown: ".concat(country.getNoValueMessage())}</dv>
<dd>${county.hasValue() ? county.getValue() : "Unknown: ".concat(county.getNoValueMessage())}</dd>
<dt><strong>Town/City</strong></dt>
<dv>${town.hasValue() ? town.getValue() : "Unknown: ".concat(town.getNoValueMessage())}</dv>
<dd>${town.hasValue() ? town.getValue() : "Unknown: ".concat(town.getNoValueMessage())}</dd>
</dl>
<p>
When the button below is clicked, JavaScript running on the client-side will be used to obtain additional evidence (i.e. the location information from the device). If no additional information appears then it may indicate an external problem such as JavaScript being disabled in your browser.
Expand All @@ -74,11 +74,11 @@
if (data.location) {
fieldValues.push(["Country", data.location.country]);
fieldValues.push(["State", data.location.state]);
fieldValues.push(["County", data.location.country]);
fieldValues.push(["County", data.location.county]);
fieldValues.push(["Town/City", data.location.town]);
}
else {
fieldValue.push(["Location data is empty. This probably means that something has gone wrong with the JavaScript evaluation.", ""])
fieldValues.push(["Location data is empty. This probably means that something has gone wrong with the JavaScript evaluation.", ""])
}
displayValues(fieldValues);
}, 'location');
Expand All @@ -88,7 +88,7 @@
var list = document.createElement("dl");
fieldValues.forEach(function (entry) {
var name = document.createElement("dt");
var value = document.createElement('dv');
var value = document.createElement('dd');
var bold = document.createElement('strong');
var fieldname = document.createTextNode(entry[0]);
var fieldvalue = document.createTextNode(entry[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,19 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
"\n" +
"<div id=\"content\">\n" +
" <p>\n" +
" The following values are determined sever-side on the first request.\n" +
" The following values are determined server-side on the first request.\n" +
" As the server has no location information to work from, these \n" +
" values will all be unknown:\n" +
" </p>\n" +
" <dl>\n" +
" <dt><strong>Country</strong></dt>\n" +
" <dv>" + (county.hasValue() ? county.getValue() : "Unknown: " + county.getNoValueMessage()) + "</dv>\n" +
" <dd>" + (country.hasValue() ? country.getValue() : "Unknown: " + country.getNoValueMessage()) + "</dd>\n" +
" <dt><strong>State</strong></dt>\n" +
" <dv>" + (state.hasValue() ? state.getValue() : "Unknown: " + state.getNoValueMessage()) + "</dv>\n" +
" <dd>" + (state.hasValue() ? state.getValue() : "Unknown: " + state.getNoValueMessage()) + "</dd>\n" +
" <dt><strong>County</strong></dt>\n" +
" <dv>" + (country.hasValue() ? country.getValue() : "Unknown: " + country.getNoValueMessage()) + "</dv>\n" +
" <dd>" + (county.hasValue() ? county.getValue() : "Unknown: " + county.getNoValueMessage()) + "</dd>\n" +
" <dt><strong>Town/City</strong></dt>\n" +
" <dv>" + (town.hasValue() ? town.getValue() : "Unknown: " + town.getNoValueMessage()) + "</dv>\n" +
" <dd>" + (town.hasValue() ? town.getValue() : "Unknown: " + town.getNoValueMessage()) + "</dd>\n" +
" </dl> \n" +
" <p>\n" +
" When the button below is clicked, JavaScript running on the client-side will be used to obtain additional evidence (i.e. the location information from the device). If no additional information appears then it may indicate an external problem such as JavaScript being disabled in your browser.\n" +
Expand All @@ -171,11 +171,11 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
" if (data.location) {\n" +
" fieldValues.push([\"Country\", data.location.country]);\n" +
" fieldValues.push([\"State\", data.location.state]);\n" +
" fieldValues.push([\"County\", data.location.country]);\n" +
" fieldValues.push([\"County\", data.location.county]);\n" +
" fieldValues.push([\"Town/City\", data.location.town]);\n" +
" }\n" +
" else {\n" +
" fieldValue.push([\"Location data is empty. This probably means that something has gone wrong with the JavaScript evaluation.\", \"\"])\n" +
" fieldValues.push([\"Location data is empty. This probably means that something has gone wrong with the JavaScript evaluation.\", \"\"])\n" +
" }\n" +
" displayValues(fieldValues);\n" +
" }, 'location');\n" +
Expand All @@ -185,7 +185,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
" var list = document.createElement('dl');\n" +
" fieldValues.forEach(function (entry) {\n" +
" var name = document.createElement('dt');\n" +
" var value = document.createElement('dv');\n" +
" var value = document.createElement('dd');\n" +
" var bold = document.createElement('strong');\n" +
" var fieldname = document.createTextNode(entry[0]);\n" +
" var fieldvalue = document.createTextNode(entry[1]);\n" +
Expand Down
Loading