I have an onClick event routine (vbScript) for a button as follows:
Sub TestButton1_OnClick(eventObj)
Dim retVal
retVal = XDocument.UI.ShowModalDialog("DiaglogHTML.htm", XDocument)
MsgBox "retVal =""" & retVal & """"
End Sub
The html file contains:
<html>
<head>
<script language="jscript" type="text/jscript">
function Initialize()
{
window.alert("Hello world!");
}
</script>
<title>Custom Dialog Box</title>
</head>
<body onLoad="Initialize()">
This is your modal dialog box.
</body>
</html>
When I preview the form in InfoPath designer, all I get is a blank window when I click on the button.
Clicking on the little red X at the top right of the blank window, the vbScript displays the MsgBox as expected which shows blank quotes (as expected) for the return value due to the fact that I don't know how to return a value.
I am using the most minimal amount of coding, etc. and I can't even get the dialog box to be anything but a blank window.
Can anyone provide some guidance?