Thankyou Steve,
that solved it!
By using the postMessage() method on the object that embeds the PDF in the web page and the FormBridge component on the form, I was able to send
messages from the page to the form.
I dug a bit more around postMessage, and also found out (should anyone need this for further reference) that communication in the opposite direction (from the form to the web page) can be achieved by calling the postMethod inside the form on the event.target.hostContainer object.
So, inside your PDF form, you could for example have javascript code like this:
event.target.hostContainer.postMessage("Hello World!");
The web page must in this case contain javascript code suitable for message handling. In particular, an event handler must be implemented for the <object> element embedding the PDF. Supposing this object has "PDFObj" as Id, the message handler code could be as follows:
function SetMessageHandler()
{
var PDFObject = document.getElementById("PDFObj");
PDFObject.messageHandler =
{
onMessage: function(aMessage)
{
alert(aMessage);
return true;
},
onError: function(error, aMessage)
{
alert(error.message);
}
};
}
...and on your <body> tag something like:
<body onload="setTimeout(SetMessageHandler, 1)">
Thanks again for the help!
Alex