Serializes the current IForm, an instance of a business object and a WebLoaderAlert to an XML string. The XML is processed by the WebLoader component to dynamically draw a form and display the business object's values in a Macromedia Flash form. After the WebLoader has rendered a form, a specified JavaScript or VBScript function is called.
An XML string representing the IForm and an associated business object instance.
The following example demonstrates how to serialize an IForm and with a scriptFunction.
C# sample
form = project.GetForm(formName);
if(form != null)
{
return form.SerializeToSwfXml(null, "UpdateIFrame", "ShowAll");
}
else
{
webLoaderAlert = new WebLoaderAlert();
webLoaderAlert.Title = "Failed to load form";
webLoaderAlert.Message = "Can't find form " formName;
return webLoaderAlert.SerializeToSwfXml();
}
form = project.GetForm(formName)
If Not form Is Nothing Then
Return form.SerializeToSwfXml(Nothing, "UpdateIFrame", "ShowAll")
Else
webLoaderAlert = New WebLoaderAlert()
webLoaderAlert.Title = "Failed to load form"
webLoaderAlert.Message = "Can't find form " formName
Return webLoaderAlert.SerializeToSwfXml()
End If
<script language="JavaScript">
<!--
var isInternetExplorer = navigator.appName.indexOf('Microsoft') != -1;
function WebLoader_DoFSCommand(command, args)
{
var fsObj = isInternetExplorer ? document.all.WebLoader : document.WebLoader;
var TableFrame = document.getElementById('DataIFrame');
TableFrame.src = '/support/PostingTable.aspx?Refresh=' args;
}
if (navigator.appName &;&; navigator.appName.indexOf('Microsoft') != -1 &;&; navigator.userAgent.indexOf('Windows') != -1 &;&; navigator.userAgent.indexOf('Windows 3.1') == -1)
{
document.write('<script language=\"VBScript\"\>\n');
document.write('On Error Resume Next\n');
document.write('Sub WebLoader_FSCommand(ByVal command, ByVal args)\n');
document.write(' Call WebLoader_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
//-->
</script<
IForm Interface | suite4.net.FormDatabase Namespace | IForm.SerializeToSwfXml Overload List