Difference between revisions of "EXECJSSP()"

From Lianjapedia
Jump to: navigation, search
(Created page with "==Purpose== Function to execute a jssp script ==Syntax== EXECJSSP(<expC1> [, <expC2>]) ==See Also== DO, EXECJAVASCRIPT(), EXECPHP(), EXECPYTHON(), EXECRSP(...")
 
(See Also)
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[DO]], [[EXECJAVASCRIPT()]], [[EXECPHP()]], [[EXECPYTHON()]], [[EXECRSP()]], [[EXECSCRIPT()]], [[JavaScript Server Pages]], [[SPAWN]], [[Visual FoxPro Server Pages|Lianja/VFP Server Pages]]  
+
[[DO]], [[EXECJAVASCRIPT()]], [[EXECPHP()]], [[EXECPYTHON()]], [[EXECRSP()]], [[EXECSCRIPT()]], [[EXECPYSP()]], [[JavaScript Server Pages]], [[Visual FoxPro Server Pages|Lianja/VFP Server Pages]], [[Python Server Pages]], [[SPAWN]]
  
 
==Description==
 
==Description==

Latest revision as of 00:47, 19 April 2021

Purpose

Function to execute a jssp script

Syntax

EXECJSSP(<expC1> [, <expC2>])

See Also

DO, EXECJAVASCRIPT(), EXECPHP(), EXECPYTHON(), EXECRSP(), EXECSCRIPT(), EXECPYSP(), JavaScript Server Pages, Lianja/VFP Server Pages, Python Server Pages, SPAWN

Description

The EXECJSSP() function executes the specified JavaScript Server page (.jssp page). The name of the jssp file is specified in <expC1> along with any required parameters. The optional <expC2> is the name of the output file that the generated HTML will be sent to. If no output file is specified, it will be sent to the current output.

Example

execJSSP("test.jssp","test.html")

test.jssp

<%@ Language=JavaScript %>
<html>
<body>
<%
	db = Lianja.openDatabase("southwind");
	rs = db.openRecordSet("select * from customers");
	print("<table><tr>");
	for (i=0; i<rs.fieldcount; ++i)
	{
		print("<td>"+rs.field(i).name+"</td>");
	}
	print("</tr>");
	rs.moveFirst();
	for (j=0; j<rs.reccount; ++j)
	{
		print("<tr valign='top'>");
		for (i=0; i<rs.fieldcount; ++i)
		{
			print("<td>"+rs.field(i).value+"</td>");
		}
		print("</tr>");
		rs.moveNext();
	}
	print("</table>");
	rs.close();
	db.close();
%>
</body>
</html>