if someone could tell me what is wrong with this rather simple code inside my file called "test.asp"?
<script src="jquery-1.2.6.js" type="text/javascript" language="javascript" runat="server"></script>
<script src="jquery.xml2json.js" type="text/javascript" language="javascript" runat="server"></script>
<%
var xml = '<xml><message>Hello world</message></xml>';
var json = $.xml2json(xml);
alert(json.message);
%>
The error message that I am getting is Microsoft JScript runtime error
'$' is undefined
I have tried XMLObjectifier as well as xml2json.js, and the common theme is that I can't seem to execute these javascript libraries inside my classic ASP file.
My understanding is that JScript, which is what ASP is written in, is javascript...just on the server side. So can I run/reference .js files inside my test.asp file?
Thank you very much! As you can tell, my asp file produces xml, but I want to transform it to json.