Vladdy
11-15-2002, 03:47 PM
Hi all.
After spending quite some time on the client side of things, I got a project that involves a good share of server side scripting...
Being as lazy as I am, I would like to use JScript for the most part ( typing "{ ... }" sure beats "Function.... End Function"). Also, regular expressions are much easier with JScript.
However there is one thing that I was not able to make work in JScript the way it does in VBScript:
<% For Each strKey In Request.ServerVariables %>
<%= strKey %>: <%= Request.ServerVariables(strKey) %>
<% Next %>
Anyway, the problem at hand is mixing VBScripts and JScripts which I had tackled for the most part.
Current stumbling block I need help with is instantiating JScript class from VBScript:
[CODE]
<%@ LANGUAGE=VBSCRIPT%>
<SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
function jScriptObject()
{ this.status = 'created';
}
</SCRIPT>
<%
' This line gives an error:
Set jsObjectInstance = new jScriptObject
%>
[CODE]
Is it doable at all?
After spending quite some time on the client side of things, I got a project that involves a good share of server side scripting...
Being as lazy as I am, I would like to use JScript for the most part ( typing "{ ... }" sure beats "Function.... End Function"). Also, regular expressions are much easier with JScript.
However there is one thing that I was not able to make work in JScript the way it does in VBScript:
<% For Each strKey In Request.ServerVariables %>
<%= strKey %>: <%= Request.ServerVariables(strKey) %>
<% Next %>
Anyway, the problem at hand is mixing VBScripts and JScripts which I had tackled for the most part.
Current stumbling block I need help with is instantiating JScript class from VBScript:
[CODE]
<%@ LANGUAGE=VBSCRIPT%>
<SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
function jScriptObject()
{ this.status = 'created';
}
</SCRIPT>
<%
' This line gives an error:
Set jsObjectInstance = new jScriptObject
%>
[CODE]
Is it doable at all?