Difference between revisions of "SHOWDOCUMENT()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
− | Function to | + | Function to displays a document in its associated plugin/application |
− | + | ||
==Syntax== | ==Syntax== | ||
SHOWDOCUMENT(<expC1>[, <expC2>[, <expC3>]]) | SHOWDOCUMENT(<expC1>[, <expC2>[, <expC3>]]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ | + | [[GETFILE()]] |
− | + | ||
==Description== | ==Description== | ||
− | The SHOWDOCUMENT() function | + | The SHOWDOCUMENT() function displays a document in its associated plugin/application. |
− | + | ||
{| class="wikitable" | {| class="wikitable" | ||
!Parameter||Description | !Parameter||Description | ||
|- | |- | ||
− | |<expC1>||A URL or the name of a file | + | |<expC1>||A URL or the name of a file. |
|- | |- | ||
|<expC2>||The target frame for browser based URLs. If omitted the document is loaded into a new browser window. Ignored for non-browser based URLs. Required if <expC3> is specified. | |<expC2>||The target frame for browser based URLs. If omitted the document is loaded into a new browser window. Ignored for non-browser based URLs. Required if <expC3> is specified. | ||
Line 26: | Line 22: | ||
|} | |} | ||
− | + | If <expC1> specifies an Excel spreadsheet file additional options can be included as arguments. The arguments follow the XLS file name and are preceded by a '?'. For further configuration, directives may be included in the template file. | |
− | If <expC1> specifies an Excel spreadsheet file additional options can be included as arguments. The arguments follow the XLS file name and are preceded by a '?'. For further configuration, directives may be included in the template file. | + | |
− | + | ||
==Example== | ==Example== | ||
Line 70: | Line 64: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 12:18, 10 February 2012
Contents
Purpose
Function to displays a document in its associated plugin/application
Syntax
SHOWDOCUMENT(<expC1>[, <expC2>[, <expC3>]])
See Also
Description
The SHOWDOCUMENT() function displays a document in its associated plugin/application.
Parameter | Description |
---|---|
<expC1> | A URL or the name of a file. |
<expC2> | The target frame for browser based URLs. If omitted the document is loaded into a new browser window. Ignored for non-browser based URLs. Required if <expC3> is specified. |
<expC3> | A templatefile for use with XML or XLS files. This is a text file containing comma separated data that is loaded into the XML or XLS file specified in <expC1>. |
If <expC1> specifies an Excel spreadsheet file additional options can be included as arguments. The arguments follow the XLS file name and are preceded by a '?'. For further configuration, directives may be included in the template file.
Example
// Accessing local files using '.pdf' and '.doc' file associations showdocument("file://C:Documents and SettingsAll UsersDocumentsAcrobat.pdf") showdocument("file://C:Documents and SettingsAll UsersDocumentsWordDoc.doc") // Remote ftp URL showdocument("ftp://ftp.recital.com/RecitalUpdate-Win.exe") // Remote http URL showdocument("http://www.recital.com", "_top") // Loading a template of comma-separated text into an XML file // and then displaying the XML file showdocument("file://C:Customers.xml", "_blank", "custdata.txt") // Example to download an Excel file, load comma delimited data into it // and then display it on the client in Microsoft Excel open database southwind use suppliers copy to datafile&(getpid()).txt type delimited showDocument("myExcelReport.xls?command=create;row=4;col=2", "_blank", "datafile&(getpid()).txt") // Example to create an HTML file on the server and // then invoke the browser on the client to display it fp = fcreate("htmlfile&(getpid()).htm") fwrite(fp, "<html>") fwrite(fp, "<body>") fwrite(fp, "<table>") fwrite(fp, "<tr>") fwrite(fp, "<td>Field1</td>") fwrite(fp, "<td>Field2</td>") fwrite(fp, "</tr>") fwrite(fp, "</table>") fwrite(fp, "</body>") fwrite(fp, "</html>") fclose(fp) showDocument("htmlfile&(getpid()).htm")