The HTML goes like this, using Jquery:
HTML Code:
<ul data-role="listview" data-dividertheme="b">
<li data-role="list-divider">EVENT INFORMATION</li>
<li>Event Date: From<br>
<input type="text" name="STwoDateFrom" id="STwoDateFrom" class="singleline" data-role="none" placeholder="MM/DD/YYYY or DD/MM/YYYY" maxlength="30" />
</li>
<li>Event Date: To<br>
<input type="text" name="STwoDateTo" id="STwoDateTo" class="singleline" data-role="none" placeholder="MM/DD/YYYY or DD/MM/YYYY" maxlength="30" />
</li>
The first part of the Javascript that loads the values into the fields looks like:
Code JavaScript:
function loadDataS2()
{ "use strict";
var setup2SummariesString = '';
var show2Summary = false;
setup2SummariesString += "--EVENT--\n Date From: ";
if (localStorage["local.storage22.STwoDateFrom"] === undefined)
{
document.form2b["STwoDateFrom"].value = '';
}
else
{
document.form2b["STwoDateFrom"].value = localStorage["local.storage22.STwoDateFrom"];
setup2SummariesString += localStorage["local.storage22.STwoDateFrom"];
show2Summary = true;
}
//
setup2SummariesString += "";
if (localStorage["local.storage22.STwoDateTo"] === undefined)
{
document.form2b["STwoDateTo"].value = '';
}
else
{
document.form2b["STwoDateTo"].value = localStorage["local.storage22.STwoDateTo"];
setup2SummariesString += "\n Date To: ";
setup2SummariesString += localStorage["local.storage22.STwoDateTo"];
show2Summary = true;
}
//
The second field that gets all the values from all the fields is:
HTML Code:
<li><a href="#" data-role="button" data-theme="e" onclick="loadDataS2()">Load</a></li>
<li>Tap on Load to fill this area.
<br>Make any changes, then tap button below to export.<br><br>
<textarea name="setupSTwoSummary" cols="20" rows="7" wrap="hard" class="summaries" placeholder="Tap on Load to fill this area." data-role="none"></textarea>
<input type="submit" value="Send above summary via email"> </li>
</ul>
I hope that helps! This isn't online; it's in an app.
Bookmarks