Click to See Complete Forum and Search --> : How to include a javacript asp file into a vbscript asp file


thebluestar136
05-28-2010, 05:56 AM
I have tried to include a JavaScript asp file into a vbscript asp file, but I did work?
I know because they are "incompatible", but I don't know how to solve it!

yamaharuss
05-28-2010, 11:44 AM
Are you asking a question?

Javascript IS compatible with ASP

and

Javascript IS NOT compatible with ASP

.. and I don't know how to solve it either.

thebluestar136
05-28-2010, 12:13 PM
I mean the asp page in kind of <%@LANGUAGE="JAVASCRIPT"%>
and <%@LANGUAGE="VBSCRIPT"%>.
In the page ASP VBSCRIPT , I want to include an asp JAVASCRIPT file, but it does not work

Kuriyama
05-28-2010, 02:24 PM
What do you mean by this.

ASP on the server side can be written using VBScript or JavaScript. Are you saying that you have server side code written in VBScript and you another file with server side code written in JavaScript?

If this is the case, then you have to convert one of the files to match the other.

Please note that javascript can also client side, and it is possible for ASP to communicate with client side javascript.

For client side javascript to communicate with ASP you would need to set up AJAX calls. For ASP to communicate with client side javascript you simply need to write the ASP values out in the javascript like so.


<%
dim someVal = "OMGVALUE"
%>
<script type="text/javascript">
var x = "<%=someVal%>";
</script>


I hope this helps.