PropertyLookup.htm
- Last UpdatedMar 12, 2021
- 1 minute read
<!DOCTYPE html>
<html class="skep">
<head>
<title>Property Lookup</title>
<meta http-equiv="content-type" content="Type=text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/knockout-3.1.0.min.js"></script>
<link rel="stylesheet" href="css/SkeltaForms.min.css" />
<style type="text/css">
body
{
font-family: arial;
font-size: 14px;
}
.liveExample
{
padding: 1em;
background-color: #EEEEDD;
border: 1px solid #CCC;
max-width: 655px;
}
.liveExample input
{
font-family: Arial;
}
.liveExample b
{
font-weight: bold;
}
.liveExample p
{
margin-top: 0.9em;
margin-bottom: 0.9em;
}
.liveExample select[multiple]
{
width: 100%;
height: 8em;
}
.liveExample h2
{
margin-top: 0.4em;
font-weight: bold;
font-size: 1.2em;
}
</style>
</head>
<body style="margin: 20px;">
<p>
URL: <input data-bind="value: url" />
</p>
<p>
Data Text Field: <input data-bind="value: dataTextField" />
</p>
<button data-bind="click: cancelClick">Cancel</button>
<button data-bind="click: submitClick">Submit</button>
</body>
<script type="text/javascript">
var editPageVm = window.parent.frames["editframe"].viewModelObject ? window.parent.frames["editframe"].viewModelObject : window.parent.frames["editframe"].contentWindow.viewModelObject;
var ViewModel = function (dataurl, datatext)
{
this.url = ko.observable(dataurl);
this.dataTextField = ko.observable(datatext);
this.submitClick = function ()
{
// URL property control in edit page
editPageVm.findById("E5").value = this.url();
// Data Text Field property control in edit page
editPageVm.findById("E20").value = this.dataTextField();
parent.document.getElementById("propertyLookupFrame").attributes["data-skfsw"].value = 0;
parent.document.getElementById("propertyLookupFrame").attributes["src"].value = "";
};
this.cancelClick = function ()
{
parent.document.getElementById("propertyLookupFrame").attributes["data-skfsw"].value = 0;
parent.document.getElementById("propertyLookupFrame").attributes["src"].value = "";
};
};
// Load data in edit mode
var uri = editPageVm.findById("E5").value;
var dtf = editPageVm.findById("E20").value;
ko.applyBindings(new ViewModel(uri, dtf));
</script>
</html>