Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8210245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:00:41+00:00 2026-06-07T10:00:41+00:00

if someone could tell me what is wrong with this rather simple code inside

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:00:44+00:00Added an answer on June 7, 2026 at 10:00 am

    Please note – I am not ignoring the fact that JScript can be used in the browser as per the excellent info on this answer: What's the difference between JavaScript and JScript?. This question clearly is talking about JScript in the context of the server, so from here on the term ‘JScript’ means the version(s) of JScript that are used in ASP or in Windows scripting

    Two languages can be equal/similar (although please note JScript is not exactly JavaScript), but their runtime environments can be completely different.

    The JavaScript that these libraries you’re trying to use is a client-side scripting language that expects to run in a browser. The browser is then the runtime environment for this code, providing the objects and services as laid out in the HTML spec (for example, the intrinsic window or document objects).

    JScript is a javascript-like language that, in this case, expects to run on a server (or in the Windows scripting environment) – i.e. in a completely different runtime environment to a browser

    In this context, then, the idea of including a client javascript library on the server is, well, erroneous to put it politely. The closest you can ever really get is on a server platform like Node.js which is ‘pure’ JavaScript; but even that can’t run client libraries like jQuery because they rely on the runtime environment provided by the browser. Yes, that can be ‘faked’ and ‘stubbed’; but not for any real benefit.

    Stop trying to do this, and rewrite it as normal client-side code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone tell me what is wrong with this piece of code? It is
Could someone please tell me whats wrong with this code because I cannot find
Could someone tell me what is wrong with this code so doxygen cannot handle?
Could someone tell me what is wrong with this code please. Public Shared Function
Could someone please tell me what is wrong with this code? It works fine
Could someone tell me if this: $.ajax({ url: 'test.html', success: function(data) { alert(Data Loaded:
I was wondering if someone could tell me what I am doing wrong that
Could someone please tell me what I am doing wrong here. I have compiled
Could someone tell if it's possible to get an OpenCL code working with both
I know that this might be a long stretch, but could someone possibly tell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.