My objective is to be able to open an ESRI map hosted on one of our other servers and return a set of coordinates to a field within Laserfiche Forms. At this point I'm just trying to return any value and have LF Forms recognize it. All I get back is undefined or nothing at all.
I'll be forthright and say that I'm not much of a web developer, so I might just be missing something basic, but I've tried several ways that I've gotten to work successfully with non-Laserfiche web pages and I'm hitting a wall. I'm wondering if there is a security restriction or something I don't know about, but I don't see any errors in the event logs.
My forms code (trying multiple methods):
$(document).ready(function () {
function HandlePopupResult(result) {
alert("result of popup is: " + result);
}
});
$(function() {
$(".radiobutton").change(function () {
var win = window.open("http://testserver/DSL_Test/test_returnval.html", "MyDialog", 300, 300, "menubar=0,toolbar=0");
var timer = setInterval(function ()
{
if (win.closed)
{
clearInterval(timer);
var myreturnValue = win.returnValue;
alert("myReturnvalue is: " + myreturnValue);
$(".Coordinates input").val(myreturnValue);
callback(myreturnValue);
}
}, 500);
});
});
My test child page:
<!DOCTYPE html>
<html>
<head>
<script>
function CloseMySelf(sender) {
try {
window.opener.HandlePopupResult(sender.getAttribute("result"));
window.parent.returnValue = "hi there";
}
catch (err) {}
window.close();
return false;
}
</script>
<a href="#" result="allow" onclick="return CloseMySelf(this);">Allow</a>
<a href="#" result="disallow" onclick="return CloseMySelf(this);">Don't Allow</a>
Thanks for any help you can give!