tags:

views:

142

answers:

1

Hello,

Is there a way to include a VBScript page into an ASP page written using Javascript?

There is an ASP page written in Javascript, but our sidebar menu is written in VBScript. When I include the sidebar asp file into the Javascript the server gives an error.

< %@ LANGUAGE="JavaScript" %>

<%

...

< !--#include file="sidebar.asp"-->

...

where sidebar.asp is written using VBScript.

A: 

You can try this, but my guess is that the sidebar.asp will be executed before your Javascript code.

< %@ LANGUAGE="JavaScript" %>

<%

...
<script language="VBscript" runat=server> 
< !--#include file="sidebar.asp"-->
</script> 
...
Eric V.
This did not work for me. The first error I got was that I had to use the src attribute of the script tag. When I put the sidebar.asp as the src, then I got errors on the ASP content (the <% ).
Justin