How to: |
The IWCLink function displays a URL in a new browser window or in a frame within your current form. You can use IWCLink as part of a technique that enables you to invoke an external procedure without the EXEC command.
IWCLink(url, [target], [newwindow], [options])
where:
Is the URL of the webpage to display.
Is the window or frame to send the URL request output to.
Determines if the URL appears in a new browser window. When this parameter is a non-zero or true, a new browser window is created.
Are new window parameters. This includes, but is not limited to, the following:
The following JavaScript code is called from a script event handler and uses IWCLink as part of a technique to invoke an external procedure, and to supply the procedure's parameter dynamically at run time.
1. var theReport = "http://172.19.81.107/ibi_apps/WFServlet?IBIF_focexec=rsales4&IBIF_parms=STCD%3D"
2. theReport = theReport + document.Form1.EditBox1.value;
3. IWCLink(theReport,"MyFrame",0,menubar=no,resizable=no,scrollbars=no, status=no,toolbar=no,height=600,width=600");
These commands accomplish the following:
When you use IWCLink as part of a technique to invoke an external procedure, the target URL must identify the WebFOCUS script (IPAddress/ibi_apps/WFServlet), the target external procedure (?IBIF_focexec=ProcedureName), and the procedure's parameters (&IBIF_parms=ParameterName%3D). A parameter name is the name of the target procedure's corresponding Dialogue Manager variable without the initial ampersand. Note that %3D is the HTML code for an equal sign; the next statement will append the parameter's value to the equal sign.
In this case, the target procedure is named rsales4, and rsales4 has a parameter named STCD.
If you want the reporting session to appear in a new browser window, you would leave the second argument blank and change the third argument from 0 to 1.
The remaining arguments beginning with "menubar" customize the appearance of the browser window; for information about browser settings, see your browser documentation.