Archive for the ‘ajaxed’ Category

ajaxed is an ASP (VBScript) library which allows you to call server side procedures from client side using JSON and Prototype JavaScript library. It is similar to xajax for PHP. Download the current version: ajaxed Library

ajaxed resource page

1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.44 out of 5)
Loading ... Loading ...
Tuesday, July 3rd, 2007

I thought its better to create an own page dedicated to the ajaxed Library. It is easier to follow the current changes, bugs, feature requests, etc. The page can be found in the menu on the right or just here. Because I got some nice feedback I will come up with more tutorial within the next weeks. Promise ;)

ajaxed: Calling server side VBScript procedures from client side (equivalent to PHP xajax)

1 Star2 Stars3 Stars4 Stars5 Stars (50 votes, average: 4.6 out of 5)
Loading ... Loading ...
Monday, July 2nd, 2007

My last post (about an ASP RSS component) included a demonstration which made use of a cool ajax technique simply called “ajaxed”. See the demonstration here again. If you play around you will recognize that there is no conventional postback and AJAX is up in here ;) I have developed a small “library” which easily allows you to call server side ASP VBScrtipt procedures from the client side. No low-level Ajax knowledge is required… (more…)

Generate JSON from VBScript (ASP) datatypes

1 Star2 Stars3 Stars4 Stars5 Stars (66 votes, average: 4.48 out of 5)
Loading ... Loading ...
Thursday, April 26th, 2007

When working with JSON it's nice to have a generator for your language which transforms all the datatypes from your chosen programming language into the JSON grammar so that you can use them within javascript. For a lot of popular languages it's done already (i suppose) but I haven't found one for classic ASP .. so here it comes. The following example quickly demonstrates what the goal is:

ASP:
  1. set RS = getRecordset("SELECT * FROM table")
  2. response.write((new JSON).toJSON("rows", RS))

A simple usage of JSON normally is that you create a page which outputs data as JSON as the only response. This page is called later from another page and the returned data is used within a javascript function (known as callback). So the snippet above gets some data from the database and stores it in an adodb.recordset which is passed then to the JSON generator and the result is printed on the page. The consuming page would like to access the data now as it originally was within the recordset. like this:

JAVASCRIPT:
  1. function callback(rows) {
  2.    for (i = 0; i <rows.length; i++) {
  3.       alert(rows[i].columName);
  4.    }
  5. }

read on to get the details... (more...)