views:

317

answers:

8

We have a large classic ASP application that we are rewriting into ASP.NET. We won't be finished with the rewrite, testing, etc until the end of next year. We're getting a lot of pressure to spruce up the interface of the classic ASP application in the meantime.

Is it possible to use jQuery with classic ASP?

+3  A: 

jQuery is a javascript framework and should in no way interfere with your classic ASP.

jQuery can be used on the client side but can only work with what it has available/can request.

Jonathan Fingland
+1  A: 

Yes, it is. ASP simply pre-processes and outputs HTML, which can be manipulated through javascript. (Or jQuery)

John McCollum
+1  A: 

I don't see why not, jQuery is a client-side library built on top of JavaScript, what are you planning on doing with jQuery?

Absolut40
One thing that happens throughout our app is lookups, such as user, organization, locations, etc. The way we do it now could be much improved. It would be great to allow the user to start typing, and we'd present matches as they typed, kind of like Google does as you type in the Google search box.
rowrow
+1  A: 

jQuery can be used in any web application. Also in your static HTML pages.

It is basically a client side javascript framework which helps you in manipulating the DOM and many other functions.

Hemanshu Bhojak
A: 

Classic ASP and ASP.Net are both server side technologies, which output HTML etc to the client browser.

JavaScript is a client side technology, and JQuery is a framework written in JavaScript, so will work on any web page (provided the browser supports it).

Therefore the answer is certainly yes.

samjudson
A: 

I use JQuery in a classic ASP website.

It works very well. Where needed I can put some ASP stuff into javascript blocks to use stuff from database:

function myjavascripfunction(){
  $("#pageTitle").html(<%= rs("Title")%>);
}

Using JQuery with ASP is great if you are unskilled in classic ASP and don't want to waste too much time on it.

PS: There's a ASP-to-JSON library that allows you to convert DB queries into JSON objects. Great for making .html pages that do ajax calls on .asp pages who's only job is to retrieve some stuff from the DB.

This way you have a reuseable .html page that you can just copy paste when you switch to another serverside language. All you'd need to do is make some .php or .aspx pages that also return JSON and call those instead of the .asp ones.

Thomas Stock
A: 

jquery isn't depends from the backend, you can use everyone technology at the backend

A: 

I'm using Mootools on the server end as well as the client end, JScript ASP rocks! :)

Pete Duncanson