SHOWDOCUMENT()

From Lianjapedia
Revision as of 12:44, 4 March 2013 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Purpose

Function to display a document in its associated plugin/application

Syntax

SHOWDOCUMENT(<expC>)

See Also

GETFILE(), SHOWHELP()

Description

The SHOWDOCUMENT() function displays a document in its associated plugin/application or performs a Lianja UI action. The <expC> is a URL, a file name or a Lianja UI Action.

Action Description
app:<id> Switch to the specified App <id>.
page:<id> Select the specified Page <id>.
section:<id>?action=<actionid> Perform the specified Action <actionid> on the specified Section <id>.
?action=search&text=expression
?action=first
?action=last
?action=next
?action=previous
?action=add
?action=delete
?action=refresh

Example

// Accessing local files using '.pdf' and '.docx' file associations
showdocument("file:///C:\Users\Myuser\Documents\Documentation for HR\Attachments\Resume.pdf")
showdocument("file:///C:\Users\Myuser\Documents\Documentation for HR\Attachments\Resume.docx")
 
// Remote ftp URL
showdocument("ftp://ftp.mycompany.com/latest.txt")
 
 
// Example to create an HTML file display in the default browser
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")