Ooops...
Option 2:
<script language="jscript" runat="server">
function myJSfunction()
{
// your jscript code here...
var rsvar = ...create the rs...
return(rsvar)
// etc...
Quote:
}
</script>
<%
... some vbscript code
Set myRs = myJSfunction()
... more vbscript code
%>
--
Michael Harris
MVP Scripting
Put it in the same page...
The VBScript code can access the recordset created in the jscript function as long as it's stored in
a variable that has page level scope or is returned explicitly to the vbscript caller as the return
value of the jscript function.
Option 1:
<script language="jscript" runat="server">
function myJSfunction()
{
// your jscript code here...
var myRS = ...create the rs...
return;
// etc...
Quote:
}
</script>
<%
... some vbscript code
Dim myRS
Call myJSfunction()
... more vbscript code
%>
Option 2:
<script language="jscript" runat="server">
function myJSfunction()
{
// your jscript code here...
var rsvar = ...create the rs...
return(rsvar)
// etc...
Quote:
}
</script>
<%
... some vbscript code
myRs = myJSfunction()
... more vbscript code
%>
--
Michael Harris
MVP Scripting
Thanks Michael, I'm assuming I can create the function right on the same
page or do I need to put it in the global.asa?
Also - The JScript creates a recordset can I call that recordset in VB
Script like normal?
Thanks Again!
Matt W.
Quote:
> Put the jscript code in a function defined something like:
> <script language="jscript" runat="server">
> function myJSfunction()
> {
> // your jscript code here...
> Response.Write("foobar");
> // etc...
> }
> </script>
> Then call the jscript function where you need it.
> <%
> ... some vbscript code
> call myJSfunction() 'or just myJSfunction
> ... more vbscript code
> %>
> --
> Michael Harris
> MVP Scripting
Quote:
> Hi Everyone,
> I have an ASP page written primarily in VB Script, but have a process in
> this page that is written in JScript. How can I announce to the server
this
> part is JScript - And then back to VB Script?
> I've tried adding
> <% Script Language ="JScript" %> - Doesn't work -
> even tried making it an #Include File which also doesn't work
> cause you can only have 1 language header.
> Any Help would be greatly appreciated.
> Matt W.