ajaxed - free classic ASP Ajax Library (VBScript)
- Do you think classic ASP is old and not up to date?
- Do you think there is no recent development done anymore with classic ASP?
- Do you think recent technologies like Ajax are a mission to implement within classic ASP?
That is all not completely true. Read on…
DEMO: Adding up two numbers, Simple RSS reading
The ajaxed Library comes up with an unique Ajax technique which can be used within your classic ASP applications. You will be able to create Rich Web Applications with not much effort.
The magic behind ajaxed: ajaxed lets you call server side VBScript code directly from client side. In other words it means that you are able to bind e.g. an click event of a button directly to a server side function.
You call a server side function and the functions return value(s) are passed to a JavaScript functions. Thats it!
- Easy installation in less than 3 minutes
- Short learning curve (about 20 minutes)
- Uses one of the most popular JavaScript Libraries: Prototype
- Object Oriented (OO) Approach
- Works with Internet Explorer and Mozilla Firefox (the only tested yet)
- No low level Ajax skills required
- Includes a complete ASP JSON generator. This is useful if you are using other JavaScript libraries such as EXT or script.aculo.us
- Additionally it includes a handful of useful and conventient server side functions which are needed in everyday ASP development
- It includes a lot additional & useful ASP functionality
- Free for use (LGPL license)
Download latest version:
- ajaxed 1.0 (released 14 April 2008 - changes)
- ajaxed 0.3 (released 18 December 2007 - see changes)
- ajaxed 0.2 (released 16 July 2007) changes
- ajaxed 0.1 (released 2 July 2007)
Edge version (at google code):
- directly from svn. (with this version you usually get the latest updates. so you should now what you do. things can be untested, etc.)
- Want help developing ajaxed and commit changes? write me!
Similar library in PHP: xajax

FEED ME!
July 8th, 2007 at 12:28 am
The ASP framework is stille one of the most used ways of creating dynamically working websites. So thank you for this option.
Not everything on the Internet has to be done useing at big canon (.NET).
July 9th, 2007 at 2:27 pm
good framework.. see this review http://www.ajaxprojects.com/ajax/projects/_NET_Frameworks/Ajaxed_Library.php
July 10th, 2007 at 8:38 am
can you provide more complex example, currently i develop a web base data management and i want to put ajax method in it, and i think ajaxed is a good option but since am newbie its hard to modify the first example to meet my need. thanks
July 10th, 2007 at 9:38 am
@ariel: I dont really know exactly what you want to achieve. please give me detailed information about your requirements and i will check if i have the time to come up with an example.
July 11th, 2007 at 10:16 am
thanks for your quick reply, let assume i have a product table with 2 fields id & name, and a page that consist of 3 button (new,list,delete) and a div with list of products.
new button will replace the list of products with the form to add new product, and after save back to list products.
list button will list the product and delete button will delete selected item(s) and return to list products
thanks again
July 29th, 2007 at 8:26 am
I want to use ajax tecnology in my classic ASP pages,as i was not much aware of the extra libraries which need to be installed i just developed a page in ajax and uploaded it on the testing server,the problem is that readystate is always==0 and the xmlhttp.open(”get”,url,true) can not be called,in nutshell i just want to ask that what could be the problem and what i need to let the ajax code run on server.
THANKS
July 30th, 2007 at 5:59 pm
Question, I just tested the “adding up two numbers” demo on my iPhone and the result is always 0 (zero).
The demo worked fine in Safari, and FireFox, but not mobile safari.
do you know of any thing that may need to be changed for use with an iPhone in the library?
I haven’t dug through the code yet but thought i’d shoot a quick question in case you’ve already run into it.
Also the RSS reader demo throws an error on the iPhone as well, it’s however in German I think and i can’t understand it but it goes like this:
Javascript:
[ “root”:{Laufzeitfehler in Microsoft VBScript - Fehler ‘800z01a8′ Objekt erforderlich: ‘lib’ /RSS/RSS.asp, line 411
again that’s only so far on an iPhone.
July 31st, 2007 at 1:49 am
Nice framework. One annoying issue though, a lot of the variables are undefined. To reproduce, add “Option Explicit” at the top of the “test.asp” page. Our applications use Options Explicit and so we’ve had to dim all the variables to be able to use the library. This will make updating to a newer version a little difficult.
Are you able to define all the variables in the next release?
July 31st, 2007 at 5:19 am
Something else that is bugging me. Where to put HTML tags like head and their corresponding closing tags?
Perhaps a change to the draw function would eliminate the problem like so:
response.clear()
writeln(”{ “”root”": {”)
…
response.flush()
response.end()
Thoughts?
August 1st, 2007 at 9:56 am
@tristan: yeah i discovered the thing with the html, head and body tags. I am working on solution for this … now it is not really easy to integrate it without touching the source code of the library … any ideas?
your idea with the response.clear() and response.end() is interesting.. i have to try it.
September 8th, 2007 at 10:39 am
I make some changes to the ajaxed/class_AjaxedPage/ajaxed.js file to make it run on jquery libary.
download it from here if you are interested.
http://ajaxed-jquery-edition.googlecode.com/files/ajaxed.js
September 9th, 2007 at 2:56 pm
That’s great Jake, I just started exploring Jquery and now i see your post here. No doubt, great timing :)
Thanks Jake!
September 10th, 2007 at 4:42 pm
Thanks for what appears to be some great code Michael. Do you have the demo for the string functions still available somewhere?
Thanks!
September 21st, 2007 at 4:53 am
Hi Guys.
Many thansk for creating such a useful library. Being a ASP developer from the days of Denali and with a large number of legacy projects behind me I was looking for ways to make some of them AJAXed.
About 2 years ago I was already working with hidden iframes and server-side callback but AJAX makes it so much simpler.
Also thanks for an ASP - JASON library. this has always been one of the sticking point re using 3rd party AJAX libraries… and VBScript is a pain with it One Varient Fits All concept.
Again thanks….
Da Wuff!!!
October 25th, 2007 at 11:51 pm
it’s good… no, it’s great… no, it’s genius!!!
thanks a lot for this… i tought i was alone in the world and all the classic ASP devs were dead or turn into zombies or something…
December 18th, 2007 at 7:29 pm
new version is here … supports the new prototype 1.6 and more..
December 21st, 2007 at 7:28 am
@Sebastian Gomez Morales
no you are not the only one :), if we ask Mr. Bill “Lord of Micro$oft” Gates to put ASP 3.0 as Open Source, will he do that? he will be the real santa claus …
January 18th, 2008 at 8:38 am
Microsoft VBScript ԋАʱ?펳 ‘800a01b6′
?ԏ??ִˊ??: ‘codePage’
\wwwroot\ajaxed\class_ajaxedPage\ajaxedPage.asp, line 318
why??????
January 18th, 2008 at 8:53 am
2 in./ajaxed/demo/default.asp,please look at this picture
http://hiphotos.baidu.com/v23502388/pic/item/0c9f5c669376d52aab184cb5.jpg
or
http://hi.baidu.com/v23502388/blog/item/17565782d8bd97a60cf4d215.html
February 2nd, 2008 at 12:19 pm
glitch in stringOperations.asp
public function JSEncode(byVal val)
val = val & “”
tmp = replace(val, chr(39), “\’”)
tmp = replace(tmp, chr(92), “\\”)
‘tmp = replace(val, chr(39), “\’”) the order is not correct
tmp = replace(tmp, chr(34), “"”)
tmp = replace(tmp, chr(13), “”)
tmp = replace(tmp, chr(10), ” “)
JSEncode = tmp
end function
February 2nd, 2008 at 12:49 pm
another comment on StringOperations
public function getHiddenInput(name, value)
getHiddenInput = “”
end function
better follow the XHTML way to use “hidden” instead of “Hidden”
March 9th, 2008 at 8:42 pm
I’ve seen that the documentation for the Ajaxed Library was created with the GabLibrary Documentor. Is this tool shared with the Gab Library and is it free to document self written classes?
March 9th, 2008 at 9:42 pm
rolphes this documenter hasnt been released to public yet .. but i am planning to do so if i have time …
March 10th, 2008 at 8:09 pm
I would really appreciate it if you could find some time to release this tool.
BTW: I like ajaxed a lot. Thanks for your god work!
March 13th, 2008 at 6:49 am
I upload the ajaxed directory to my wwwroot, going to “http://localhost/ajaxed/demo/” will display the form but i get a javascript error.. saying ajaxed is not defined.. Is there something I need to configure on my server?
Thanks
March 13th, 2008 at 6:51 am
Nevermind… found it… gotta mess the config file..
Thanks anyway
March 13th, 2008 at 10:24 am
rolphes i will do my best to come up with it soon
March 13th, 2008 at 6:11 pm
Nice work. I’m sure the 20mins learning curve is true for most, especially if you read the tutorials. I didn’t and had hours of fun trying to get things working ;)
Just to re-ask a question originally by Tristan in July last year - where do the HTML head, meta, etc tags go? I have tried inside and outside the main() sub and ajaxed doesn’t work (outside) or they are ignored (inside) :(
March 13th, 2008 at 6:16 pm
fred thanks for your nice feedback .. good to see that ppl are using it. i have already a new version which has the problem solved with HEAD, etc. will release it soon.
March 16th, 2008 at 3:53 pm
for all of you who want to stay on the edge of the development .. i have created a google project for ajaxed and the source is controled by svn … so you can always get the latest changes..
check it here: http://code.google.com/p/asp-ajaxed/
the version in the trunk is fully functioning and contains already the header and footer solution. see the changes.txt there for more details.
March 16th, 2008 at 10:21 pm
That is just excellent! Thanks for all the hard work on this library - I’ll be checking it out tomorrow.
I’m still having issues, but that’s down to my complete lack of any Java/JavaScript experience and not a problem with ajaxed ;)
March 16th, 2008 at 10:39 pm
fred try to use my new discussion group at http://groups.google.com/group/asp-ajaxed
describe your problem detailed there.
March 27th, 2008 at 3:27 pm
goodd
March 30th, 2008 at 4:31 pm
HI
This looks like a great oppotunity to incrementally add Ajax updates to existing application pages. I hit a few problems regarding global vbscript variables on existing pages . Worked around this but wanted to make sure that I am correct in thinking that any server side vbscript code that is left outside of the init() callback() and main() subs will only be run when doing a traditional load of the page.
So when perfroming an ajaxed call back is ONLY the call back function run , or will any VBscript not contained within a sub or function also be run ?
My existing code has a large chunk of in line script that is currently setting up globals that are referenced within subs and functions ( sounds bad but these subs are building HTML strings so style options etc it makes sense) , and processing various form actions on a traditional submit.
I am currently leaving this at the top of the page before declaring the ajaxedPage calback and init functions. Intending over time to move these actions into functions to be called via ajaxed. It seems to be working but would like to know that I am not setting myself up for future problems by false assumptions about what is really happening.
Thanks
Drew
March 30th, 2008 at 4:55 pm
andrew its perfect for integrating new functionality into old apps .. its not a problem if you have code which will be run before … if you put code outside the main, init and callback it will be run before (if its situated before)
i recommend you to get the latest version directly from SVN .. there are some new updates. especially header and footer support
March 30th, 2008 at 5:31 pm
Thanksfor the quick response, just to clarify , what i run on ajaxed.callback ? JUST the callback function ?
Thanks
March 30th, 2008 at 5:43 pm
first init sub is called and then callback sub .. thats all
March 30th, 2008 at 5:51 pm
Great - otherwise it was going to get very complicated !!!!!!
March 31st, 2008 at 2:09 pm
Am I missing something here ?
I am trying to load a large select list immediately after the page loads.
it seems to be working fine in Firefox, and kinda / sorta in IE. Th edifference being that in IE the browser freezes for the length of time that the callback response hadling function is running .
The actual call back is happenning fine, however with this long list the time to insert the options is fairly large and the freezing is very notcable,
Could it be that I am calling the ajaxed.callback function directly from the existing pageloaded function rather than directly from an event handler ? and work arounds for this ?
Thanks
Andrew
March 31st, 2008 at 2:26 pm
andrew try to call it after the page has been loaded
March 31st, 2008 at 3:42 pm
not quite sure what you mean as I think that is what I am doing.
Currently have
____________________________
function gotvendors(recs) {
var vid = $(”vendorid”).value;
for ( i=0; i < recs.length; i++) {
var op = new Option(recs[i].vname, recs[i].vendorid, false,recs[i].vendorid == vid)
$(”ctrl_vendorid”).options[$(”ctrl_vendorid”).options.length] = op
}
}
function pageloaded () {
blah blah
ajaxed.callback(”loadvendordropdown”,gotvendors)
}
——————
also tried
var res = ajaxed.callback(”loadvendordropdown”,gotvendors)
and
ajaxed.callback(”loadvendordropdown”,function(recs) {
var vid = $(”vendorid”).value;
for ( i=0; i < recs.length; i++) {
var op = new Option(recs[i].vname, recs[i].vendorid, false,recs[i].vendorid == vid)
$(”ctrl_vendorid”).options[$(”ctrl_vendorid”).options.length] = op
}
} )
is this not what you mean by calling after the page has loaded ?
Thanks for your help
Andrew
April 1st, 2008 at 7:11 pm
andrew this should be fine .. you could try to post it in our discussion group .. maybe someone has a suggestion
April 2nd, 2008 at 1:17 pm
Im running NT2K and IIS5….with all browsers ive tried I keep getting this error. I loaded the ajaxed folder into my webs root so everything is as the docs say to load it…
But im getting this error…any idea why?
Microsoft VBScript runtime error ‘800a01b6′
Object doesn’t support this property or method: ‘codePage’
/ajaxed/class_ajaxedPage/ajaxedPage.asp, line 318
April 2nd, 2008 at 1:55 pm
hi matt .. afaik codepage is supported with IIS 5.1 and higher … so 5.0 is not good
May 12th, 2008 at 1:40 am
Hi,
Very cool stuff! If anyone here is interested in doing classic ASP work in either a full time or part time capacity, let me know. I typically would not post this type of question here, but based upon the content of this particular blog and those reading it, this audience is the type of crew we are definitely looking for.
Thanks!
May 12th, 2008 at 8:01 pm
I was wondering if there is going to be functions made for file upload with ajax?
May 13th, 2008 at 10:59 am
natalie there will be but i dont know when … could take some while .. the next release is coming soon: it includes e.g. a logger, generic email component, …
June 4th, 2008 at 11:23 am
Thanks you So much…
June 7th, 2008 at 1:35 am
Greetings from Brazil !!!
It’s one of the most useful framework ever done for a ancient language (hehehe). It’s helping me to avoid hours learning new freak languages to get right the same result I always got with classic ASP in my personal projects.
Thanks a lot…
I just ask for more samples and if you have time to send me any little sample of getting data from DB to show it on a table result I will be more grateful.
June 7th, 2008 at 2:06 am
hey caesar thx for your comment ... its good to hear that ppl still need classic asp now and then ;)
regarding your question pls read first http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/ which explains how to use database with ajaxed.
but creating a table is easy and basically the same as u would do it without ajaxed:
June 7th, 2008 at 2:42 am
Hey man, are you kidding me ? eheheheh
I know very well how to create a table from a DB, I have a lot of personal projects working fine...
I'm having problems to do it with ajaxed framework...
I mean, create dynamic table from callback vbscript sub...
Right now I'm getting data from this callback function and them I put it within DIVs by innerHtml, one by one, it's not funny for complex tables...
June 8th, 2008 at 9:09 am
hi Caeser i know how make table by Javascript inside the callback,
create first a table with id="varTbl" then this is simple code
this a sample of code :D
July 14th, 2008 at 6:41 am
Hi,
First of all thanks for such a wonder full framework. It will help me avoid wasting time learning the SO CALLED NEW LANG which give the same effect as existing ones.
Still worse It will save all the world done in older languages, bring them up to speed...
Thanks for sharing this,
July 15th, 2008 at 3:28 am
[...] who helped making this little tool what it is. Dont forget that it is a major component within the ajaxed library. Using ajaxed makes your life even more easier [...]
July 25th, 2008 at 4:01 am
[...] proudly present the new logo of our ajaxed library. Just achieve a bit of identity ;) What do you think? Do you like it or is it just another [...]