<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Dev Bros &#187; ajaxed</title>
	<atom:link href="http://www.webdevbros.net/category/classic-asp/ajaxed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevbros.net</link>
	<description>hot talk about web development</description>
	<lastBuildDate>Wed, 16 Dec 2009 12:59:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ajaxed 2.0 released</title>
		<link>http://www.webdevbros.net/2008/11/25/ajaxed-20-released/</link>
		<comments>http://www.webdevbros.net/2008/11/25/ajaxed-20-released/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 10:53:54 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/?p=214</guid>
		<description><![CDATA[It&#8217;s been some time since the last version has been released. But today it&#8217;s here! Fresh and with loads of updates comes the brand new ajaxed version 2.0. Coupled with it we proud to announce the new official ajaxed website &#8211; ajaxed.org. 

The community is growing and ajaxed already helps a lot developers to keep [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been some time since the last version has been released. But today it&#8217;s here! Fresh and with loads of updates comes the brand new ajaxed version 2.0. Coupled with it we proud to announce the new official ajaxed website &#8211; <a href="http://www.ajaxed.org">ajaxed.org</a>. </p>
<p><a href='http://www.ajaxed.org'><img src="http://www.webdevbros.net/wp-content/uploads/2008/11/ajaxedorg.jpg" alt="official ajaxed.org website" title="official ajaxed.org website" width="394" height="256" class="aligncenter size-full wp-image-215" /></a></p>
<p>The community is growing and ajaxed already helps a lot developers to keep their legacy ASP application still up to date. Some highlight of the release:</p>
<p><strong><a href="http://www.ajaxed.org/article/Finally-Version-20-is-here-Overview-about-the-Highlights/19/">Read about the highlight of version 2.0</a></strong></p>
<p>One cool thing on the new website is the publicly available <a href="http://www.ajaxed.org/source/">source code of ajaxed.org</a>. Thats a great resource to have a look into real world ajaxed development. </p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/11/25/ajaxed-20-released/&amp;t=ajaxed+2.0+released&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/11/25/ajaxed-20-released/&amp;title=ajaxed+2.0+released&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/11/25/ajaxed-20-released/&amp;title=ajaxed+2.0+released&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+2.0+released;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/11/25/ajaxed-20-released/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/11/25/ajaxed-20-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Launched with ajaxed: Tourmandu &#8211; Platform for local tour guides</title>
		<link>http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/</link>
		<comments>http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:05:06 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ASP (VBScript)]]></category>
		<category><![CDATA[ajaxed]]></category>
		<category><![CDATA[communities]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/</guid>
		<description><![CDATA[I proudly announce the launch of a new project developed with ajaxed &#8211; yes with classic asp :). It&#8217;s a platform for everyone who wants to show tourists/visitors around in his/her hometown and earn some pocket money. Let&#8217;s face this:

You are a student and love to get in touch with people from around the globe. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tourmandu.com"><img height="38" alt="tourmandu.com" src="http://www.webdevbros.net/wp-content/uploads/2008/10/logo.png" width="200" align="left" /></a>I proudly announce the launch of a new project developed with <a href="http://www.webdevbros.net/ajaxed/">ajaxed</a> &#8211; yes with classic asp :). It&#8217;s a platform for everyone who wants to show tourists/visitors around in his/her hometown and earn some pocket money. Let&#8217;s face this:</p>
<blockquote>
<p>You are a student and love to get in touch with people from around the globe. On Tourmandu you can offer a tour in your hometown and tourists can get in touch with you. You show them &#8217;round and they pay/tip you afterwards. Not a bad idea :) Great part time income &#8230;</p>
</blockquote>
<p>As the project has been recently launched its a bit empty, but have a look at some existing tour to get an idea of what i am talking about..</p>
<ul dir="ltr">
<li>
<div><a title="Locals in australia" href="http://www.tourmandu.com/local-tours/Australia/">Tours in Australia</a></div>
</li>
<li>
<div><a title="locals in paris" href="http://www.tourmandu.com/local-tours/Paris/">Tours is Paris, France</a></div>
</li>
<li>
<div><a href="http://www.tourmandu.com/local-tours/Spain/159/">Tours in Spain</a></div>
</li>
<li>
<div><a href="http://www.tourmandu.com/local-tours/Usa/27/">Tours in the USA</a></div>
</li>
<li>
<div><a href="http://www.tourmandu.com/local-tour-guides/City/Famous-sightseeing-spots/">Guides for Famous sightseeing spots</a></div>
</li>
</ul>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/&amp;t=Launched+with+ajaxed%3A+Tourmandu+-+Platform+for+local+tour+guides&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/&amp;title=Launched+with+ajaxed%3A+Tourmandu+-+Platform+for+local+tour+guides&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/&amp;title=Launched+with+ajaxed%3A+Tourmandu+-+Platform+for+local+tour+guides&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Launched+with+ajaxed%3A+Tourmandu+-+Platform+for+local+tour+guides;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/10/31/launched-with-ajaxed-tourmandu-platform-for-local-tour-guides/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Cool way of creating arrays in ASP (VBScript) &#8211; advanced</title>
		<link>http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/</link>
		<comments>http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 10:13:59 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>
		<category><![CDATA[classic ASP (VBScript)]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/</guid>
		<description><![CDATA[It&#8217;s a small function which I will introduce today but very useful. When working recently on ajaxed i discovered that its often possible to pass an array or a primitive type as an argument to a function. Lets say you have a function println(msg) which prints out its argument as a line to the screen. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a small function which I will introduce today but very useful. When working recently on <a href="http://www.webdevbros.net/ajaxed/">ajaxed</a> i discovered that its often possible to pass an array or a primitive type as an argument to a function. Lets say you have a function <code>println(msg)</code> which prints out its argument as a line to the screen. When the argument is an array then it treats each field as a line. So it should be possible to call the function with those variations:</p>
<pre>
<code>println("something")
println(array("some", "more", "lines"))</code>
</pre>
<p>Lets see how we solve the solution in a nice way and how we will be able to create a function which is simply called <strong>[]</strong> (which is common syntax for an array in other languages).</p>
<p> <span id="more-208"></span>
<p>First we create the <code>println</code> function which prints out the line(s):</p>
<pre>
<code>sub println(line)
  lines = arrayize(line)
  for each l in lines
    response.write(l)
  next
end sub</code>
</pre>
<p>As you can see we use an <code>arrayize</code> function internally which will ensure a variable to be an array. This little function does the job and helps us to keep our code nice and simple:</p>
<pre>
function arrayize(value)
  if isArray(value) then
    arrayize = value
  elseif isEmpty(value) then
    arrayize = array()
  else
    arrayize = array(value)
  end if
end function
</pre>
<p>Its straightforward but very effective. This function ensures a variable to be an array. If its already an array then its just passed trhough, otherwise the value is take as the first field of the array. In case of an <code>empty</code> variable it returns an empty array.</p>
<p>Thats it! But we go a step further and create an alias for it which will make the usage even more simpler. Lets check this:</p>
<pre>
function [](value)
  [] = arrayize(value)
end function
</pre>
<p>Exactly, we use the squared brackets (which are normally used to escape reserved words). Back to our first function it looks like this now:</p>
<pre>
sub println(line)
  for each l in [](line)
  response.write(l)
  next
end sub
</pre>
<p>I dont know about you guys, but i am very excited about this way. It makes my code much clearer now. Btw: This will be part of the version 2.0 of <a href="http://www.webdevbros.net/ajaxed/">ajaxed</a>.</p>
<p xmlns="" class="zoundry_raven_tags">  <!-- Tag links generated by Zoundry Raven. Do not manually edit. http://www.zoundryraven.com -->  <span class="ztags"><span class="ztagspace">Technorati</span> : <a href="http://www.technorati.com/tag/array" class="ztag" rel="tag">array</a>, <a href="http://www.technorati.com/tag/asp" class="ztag" rel="tag">asp</a>, <a href="http://www.technorati.com/tag/vbscript" class="ztag" rel="tag">vbscript</a></span>  <br/> <span class="ztags"><span class="ztagspace">Del.icio.us</span> : <a href="http://del.icio.us/tag/array" class="ztag" rel="tag">array</a>, <a href="http://del.icio.us/tag/asp" class="ztag" rel="tag">asp</a>, <a href="http://del.icio.us/tag/vbscript" class="ztag" rel="tag">vbscript</a></span> </p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/&amp;t=Cool+way+of+creating+arrays+in+ASP+%28VBScript%29+-+advanced&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/&amp;title=Cool+way+of+creating+arrays+in+ASP+%28VBScript%29+-+advanced&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/&amp;title=Cool+way+of+creating+arrays+in+ASP+%28VBScript%29+-+advanced&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Cool+way+of+creating+arrays+in+ASP+%28VBScript%29+-+advanced;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/08/08/cool-way-of-creating-arrays-in-asp-vbscript-advanced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ajaxed gets a face</title>
		<link>http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/</link>
		<comments>http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 03:01:55 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ASP (VBScript)]]></category>
		<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/?p=193</guid>
		<description><![CDATA[I 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 web 2.0 logo :) Btw: I have just purchased ajaxed.org which will be the new home for ajaxed. A lot of tutorials, better documentation and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webdevbros.net/wp-content/uploads/2008/07/ajaxed.gif" alt="" title="ajaxed" width="285" height="99" class="alignleft size-full wp-image-194" />I proudly present the new logo of our <a hreft="http://www.webdevbros.net/ajaxed/">ajaxed</a> library. Just achieve a bit of identity ;) What do you think? Do you like it or is it just another web 2.0 logo :) Btw: I have just purchased <a href="http://www.ajaxed.org">ajaxed.org</a> which will be the new home for ajaxed. A lot of tutorials, better documentation and version 2 is coming soon. Thanks again for all your support guys!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/&amp;t=ajaxed+gets+a+face&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/&amp;title=ajaxed+gets+a+face&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/&amp;title=ajaxed+gets+a+face&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+gets+a+face;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/07/25/ajaxed-gets-a-face/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Developing a &#8216;login&#8217; with ajaxed</title>
		<link>http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/</link>
		<comments>http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 10:14:33 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/</guid>
		<description><![CDATA[Today we will check how we could realize a simple login using ajaxed for your web application. You know the common stuff where you enter your credentials (email and password) and you get authorized if they are correct.

Let's start of with the form...
PLAIN TEXT
HTML:




&#60;form id="frm"&#62;


&#160; &#160; &#60;strong&#62;Email:&#60;/strong&#62;&#60;br&#62;


&#160; &#160; &#60;input type="text" name="email"&#62;


&#160; &#160; &#60;br&#62;&#60;br&#62;


&#160; &#160; &#60;strong&#62;Password:&#60;/strong&#62;&#60;br&#62;


&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Today we will check how we could realize a simple login using <code>ajaxed</code> for your web application. You know the common stuff where you enter your credentials (email and password) and you get authorized if they are correct.<br />
<span id="more-170"></span><br />
Let's start of with the form...</p>
<div class="igBar"><span id="lhtml-4"><a href="#" onclick="javascript:showCodeTxt('html-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-4">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"frm"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">&lt;strong&gt;</span></a></span>Email:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/strong&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"email"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">&lt;strong&gt;</span></a></span>Password:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/strong&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"password"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"pwd"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">&lt;button</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"button"</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">"ajaxed.callback('login', loggedin)"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; login</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/button&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Its very simple. Two text inputs and a button. Both text inputs have a name so we can talk to them. As you can already see we also hooked up a callback on the login button. Quite clear, because we'll handle the login on the server side. But before we do so we need to have a database with a <code>user</code> table including <code>id</code>, <code>email</code> and <code>pwd</code> column. (get a read about <a href="http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/">'using a database with ajaxed'</a> if you feel the need)</p>
<p>Now we write our server side callback which will handle the <code>login</code> action</p>
<div class="igBar"><span id="lasp-5"><a href="#" onclick="javascript:showCodeTxt('asp-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-5">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> callback<span style="color:#006600; font-weight:bold;">&#40;</span>a<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000;">'hit the road if its an unknow action</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">if</span> a &lt;&gt; <span style="color:#CC0000;">"login"</span> <span style="color:#990099; font-weight:bold;">then</span> <span style="color:#990099; font-weight:bold;">exit</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; sql = &nbsp; <span style="color:#CC0000;">"SELECT id "</span> &amp; _</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0000;">"FROM user "</span> &amp; _</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0000;">"WHERE email = '"</span> &amp; str.<span style="color:#9900CC;">sqlSafe</span><span style="color:#006600; font-weight:bold;">&#40;</span>page.<span style="color:#9900CC;">RF</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"email"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp; <span style="color:#CC0000;">"' "</span> &amp; _</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0000;">"AND pwd = '"</span> &amp; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">new</span> MD5<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">hash</span><span style="color:#006600; font-weight:bold;">&#40;</span>page.<span style="color:#9900CC;">RF</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"pwd"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp; <span style="color:#CC0000;">"'"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ID = db.<span style="color:#9900CC;">getScalar</span><span style="color:#006600; font-weight:bold;">&#40;</span>sql, <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">if</span> ID&gt; <span style="color:#800000;color:#800000;">0</span> <span style="color:#990099; font-weight:bold;">then</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">session</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"user"</span><span style="color:#006600; font-weight:bold;">&#41;</span> = ID</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; page.<span style="color:#9900CC;">return</span> <span style="color:#0000FF; font-weight:bold;">true</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; page.<span style="color:#9900CC;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#990099; font-weight:bold;">if</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically it checks if a user with the given email and password exists. The <code>db.getScalar</code> function returns the users ID or <code>0</code> if no such user exists. If the ID was found (line 8) we log the user in by setting a session variable to its ID. After that we return <code>true</code> to the javascript callback (line 10) which can notify the user about the success. If the ID was 0 we return <code>false</code>. As you can see we used <code>str.sqlSafe</code> for the email to prevent SQL injection and we hashed the password with an <code>MD5</code> hash. This assumes that our passwords are hashed in the database (which is very common).</p>
<p>Last but not least we need the javascript callback function to notify the user about failure or success. On success we forward him/her to our default page (in this case just the root) and on failure we show a message.</p>
<div class="igBar"><span id="ljavascript-6"><a href="#" onclick="javascript:showCodeTxt('javascript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> loggedin<span style="color: #66cc66;">&#40;</span>r<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!r<span style="color: #66cc66;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'could not login'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; window.<span style="color: #006600;">location</span>.<span style="color: #006600;">href</span> = <span style="color: #3366CC;">'/'</span>;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That was it. In fact you will need a bit more for you application but this gives you an idea about how to solve such a common problem with ajaxed.</p>
<p><a href='http://www.webdevbros.net/wp-content/uploads/2008/04/login.txt' title='login.txt'><strong>Download the full login.asp</strong></a> (tested with ajaxed 1.0)</p>
<p>You probably could extend your script ...</p>
<ul>
<li>.. that it checks if you are already logged in</li>
<li>.. that it handles logout</li>
<li>.. redirect the user to the originally requested url</li>
</ul>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/&amp;t=Developing+a+%27login%27+with+ajaxed&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/&amp;title=Developing+a+%27login%27+with+ajaxed&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/&amp;title=Developing+a+%27login%27+with+ajaxed&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Developing+a+%27login%27+with+ajaxed;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/04/17/developing-a-login-with-ajaxed/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>ajaxed 1.0 released</title>
		<link>http://www.webdevbros.net/2008/04/15/ajaxed-10-released/</link>
		<comments>http://www.webdevbros.net/2008/04/15/ajaxed-10-released/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 07:55:23 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>
		<category><![CDATA[classic ASP (VBScript)]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2008/04/15/ajaxed-10-released/</guid>
		<description><![CDATA[the new major release of asp ajaxed is here. I have jumped with counting to version 1.0 because it has been such a big update and the library reached its maturity level. Curious whats new in the box? A lot of  improvements and new stuff - i got a lot of inspiration from ruby [...]]]></description>
			<content:encoded><![CDATA[<p>the new major release of asp ajaxed is here. I have jumped with counting to version 1.0 because it has been such a big update and the library reached its maturity level. Curious whats new in the box? A lot of  improvements and new stuff - i got a lot of inspiration from ruby on rails as well and the biggest goodie is an own developer console with unit tests, documentation creator...</p>
<p><a href='http://www.webdevbros.net/wp-content/uploads/2008/04/ajaxed1.gif' title='ajaxed1.gif'><img src='http://www.webdevbros.net/wp-content/uploads/2008/04/ajaxed1.thumbnail.gif' alt='ajaxed1.gif' /></a><a href='http://www.webdevbros.net/wp-content/uploads/2008/04/ajaxed2.gif' title='ajaxed2.gif'><img src='http://www.webdevbros.net/wp-content/uploads/2008/04/ajaxed2.thumbnail.gif' alt='ajaxed2.gif' /></a><br />
<span id="more-165"></span></p>
<p>For all who cannot wait go directly to the <a href="http://www.webdevbros.net/wp-content/uploads/2008/04/ajaxed10.zip">download</a> and update to the new version.</p>
<p>Ok, so whats new in 1.0? I have aggregated all the comments and tried to implement all your requests. As I am developing with Ruby on Rails, I have added some rubyism to the whole library as well. Do I have to change my running system completely now? No! no need to panick. There are only two small things you need to prepare before upgrading to 1.0 (mentioned at the end of the article). Ok, let's move to the updates...</p>
<p><strong>ajaxed console</strong><br />
Probably the most fancy update is the new ajaxed console which supports you while you develop your applications. its immediately available through <code>/ajaxed/console/</code> on your server. You'll find there a lot of useful stuff like a test runner, current configuration, documentation creator, regular expression evaluator, etc. Check a <a href="http://www.grafix.at/ajaxed/console/">demo of the console here</a></p>
<p><strong>New ajaxed config</strong><br />
The ajaxed config (<code>config.asp</code>) has been moved to an own folder which is located in the webroot <code>/ajaxedConfig/config.asp</code>. Seperating the configuration from the library makes the update process easier now. You can overwrite the ajaxed library without any thoughts...</p>
<p><strong>html, head and body tags integration (header &#038; footer)</strong><br />
People used to have problems of integrating the html, head and body tags into their pages.  This has been solved now and you can find a <code>header.asp</code> and <code>footer.asp</code> in your ajaxedConfig folder. Those files are automatically loaded within your pages. This change brought some additional features as well</p>
<ul>
<li><code>ajaxedPage.defaultStructure</code> property lets you load your page with a default header and footer (provided by the library itself). This is useful if you quickly need a standard structure and don't really care about the details</li>
<li><code>ajaxedPage.title</code> gives you the possibility to assign a title to your page which may be used in the <code>header</code></li>
<li><code>ajaxedPage.plain</code> property allows to render a page completely plain which means it renders only those things which are defined in the page itself. (no header and footer). You will need this for your <code>XHR</code></li>
<li><code>lib.exec</code> lets you call any function only if it exists. This is used within the <code>header</code> to allow page specific head elements. Whenever you want anything to appear in your header just add a <code>header() sub</code> to your page and place the stuff there. e.g. especially javascripts, styles</li>
</ul>
<div class="igBar"><span id="lasp-14"><a href="#" onclick="javascript:showCodeTxt('asp-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-14">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span> <span style="color:#0000FF; font-weight:bold;">sub</span> header<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#0000FF; font-weight:bold;">%&gt;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;style&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* some styles */</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/style&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">&lt;%</span> page.<span style="color:#9900CC;">loadJSFile</span> <span style="color:#CC0000;">"someJSFile.js"</span> <span style="color:#0000FF; font-weight:bold;">%&gt;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span> <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span> <span style="color:#0000FF; font-weight:bold;">%&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Best thing is you take a look into the predefined <code>header.asp</code> in your config to see whats going on there. And don't forget it's up to you what you bung in there. You can add as many <code>lib.exec</code> calls as you want.</p>
<p><strong>Environment support</strong><br />
ajaxed supports two environments now: <code>LIVE</code> (production) and <code>DEV</code> (development). The config variable <code>AJAXED_ENVIRONMENT</code> sets the current environment. This enhancement allows us ...</p>
<ul>
<li>creating conditions dependent on the environment. <code>lib.env</code>, <code>lib.DEV</code> and <code>lib.LIVE</code> are helpers to check which environment is running.</li>
<li>setting <code>ajaxedPage.onlyDev</code> to <code>true</code> in order to prevent calling it on the <code>LIVE</code> environment. E.g. whole ajaxed console and tests are only available on DEV env yet.</li>
</ul>
<p>(The default environment is always development)</p>
<p><strong>Unit tests</strong><br />
<code>TestFixture</code> class lets you create unit tests for your own applications. It comes with a lot of different asserts (as commonly known in other unit testing frameworks) and is very quickly to set up. After you have written your tests you can run them directly from the ajaxed console. Tests for the library itself are located there as well. Here is an example of how you write a simple test (test file must start with <code>test_</code>):</p>
<div class="igBar"><span id="lasp-15"><a href="#" onclick="javascript:showCodeTxt('asp-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-15">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!--#include virtual=<span style="color:#CC0000;">"/ajaxed/class_testFixture/testFixture.asp"</span>--&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> tf = <span style="color:#0000FF; font-weight:bold;">new</span> TestFixture</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tf.<span style="color:#9900CC;">run</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'create test methods starting with test_ </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'followed by an increasing number</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> test_1<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tf.<span style="color:#9900CC;">assertEqual</span> <span style="color:#CC0000;">"x"</span>, <span style="color:#CC0000;">"x"</span>, <span style="color:#CC0000;">"x should be x"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tf.<span style="color:#9900CC;">assert</span> <span style="color:#800000;color:#800000;">1</span> = <span style="color:#800000;color:#800000;">1</span>, <span style="color:#CC0000;">"one should be definitely one"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tf.<span style="color:#9900CC;">assertInstanceOf</span> <span style="color:#CC0000;">"testFixture"</span>, tf, <span style="color:#CC0000;">"this test should be a TestFixture"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tf.<span style="color:#9900CC;">assertInDelta</span> <span style="color:#800000;color:#800000;">1</span>, <span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">1</span>, <span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>, <span style="color:#CC0000;">"equality with a delta"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tf.<span style="color:#9900CC;">assertHas</span> <span style="color:#990099; font-weight:bold;">array</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">1</span>, <span style="color:#800000;color:#800000;">2</span>, <span style="color:#800000;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#800000;color:#800000;">2</span>, <span style="color:#CC0000;">"the array should contain 2"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">%&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Documentation generator (Documentor)</strong><br />
Some of you have long waited for the day to come :) Finally its here! Automatically create a documentation of your ASP code. The tool is called <code>Documentor</code> and can be found within your ajaxed console. It is also used for the generation of the actual ajaxed documentation which got a small face lift as well. Read <a href="http://www.grafix.at/ajaxed/console/documentor/manual.asp">How to document</a> to know more about documenting your code (This manual can be found in your ajaxed console). Example of a method documentation:</p>
<div class="igBar"><span id="lasp-16"><a href="#" onclick="javascript:showCodeTxt('asp-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-16">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'' @DESCRIPTION: gets all users for a given country</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'' @PARAM: country [string]: specified country. e.g. AT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'' @RETURN: [recordset]</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">function</span> getUsersBy<span style="color:#006600; font-weight:bold;">&#40;</span>country<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">function</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Automatic version check</strong><br />
The ajaxed console checks automatically for a new version of ajaxed and reminds you if there is a new version available. Never miss an update.</p>
<p><strong>MD5 hash class</strong><br />
We have a hash on board of the library now. Hash your passwords, etc. easily with:</p>
<div class="igBar"><span id="lasp-17"><a href="#" onclick="javascript:showCodeTxt('asp-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-17">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">hash = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">new</span> MD5<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">hash</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"mypassword"</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Database methods</strong><br />
There are some new useful database methods which makes your code more readable and easier to debug. </p>
<div class="igBar"><span id="lasp-18"><a href="#" onclick="javascript:showCodeTxt('asp-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-18">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'get the number of records of a table</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">numberOfRecords = db.<span style="color:#330066;">count</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"tablename"</span>, empty<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'get number of records with condition</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">numberOfRecords = db.<span style="color:#330066;">count</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"tablename"</span>, <span style="color:#CC0000;">"active = 1"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'insert a record into a table (returns the ID)</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ID = db.<span style="color:#9900CC;">insert</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"tablename"</span>, <span style="color:#990099; font-weight:bold;">array</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"firstname"</span>, <span style="color:#CC0000;">"jack"</span>, <span style="color:#CC0000;">"lastname"</span>, <span style="color:#CC0000;">"johnson"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'updating a record</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#9900CC;">update</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#990099; font-weight:bold;">array</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"firstname"</span>, <span style="color:#CC0000;">"Johnny"</span><span style="color:#006600; font-weight:bold;">&#41;</span>, ID</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'works as well with condition</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#9900CC;">update</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#990099; font-weight:bold;">array</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"firstname"</span>, <span style="color:#CC0000;">"Johnny"</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#CC0000;">"firstname = 'Jack'"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'delete a record with a condition</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#330066;">delete</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#CC0000;">"active = 0"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'delete with an ID</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#330066;">delete</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#800000;color:#800000;">10</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'toggle the value of bit fields.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#9900CC;">toggle</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#CC0000;">"active"</span>, <span style="color:#CC0000;">"country = 'AT'"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'or with ID</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">db.<span style="color:#9900CC;">toggle</span> <span style="color:#CC0000;">"tablename"</span>, <span style="color:#CC0000;">"active"</span>, <span style="color:#800000;color:#800000;">10</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Most of them support a condition parameter which can be either a number (its used automatically as ID) or a string (which is a condition for the <code>WHERE</code> clause).<br />
Those are handy for common CRUD operations. If you need more sophisticated stuff you should still use <code>db.getRecordset()</code>.</p>
<p><strong>RSS reader and writer</strong><br />
If you ever want to generate an RSS feed in your application or read another one - it's no problem anymore. ajaxed has the right component inside. There is a full detailed article about this component <a href="http://www.webdevbros.net/2007/07/01/asp-vbscript-rss-readerwriter-class/">here</a>.</p>
<div class="igBar"><span id="lasp-19"><a href="#" onclick="javascript:showCodeTxt('asp-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-19">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'example of reading some feed</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> r = <span style="color:#0000FF; font-weight:bold;">new</span> RSS</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">r.<span style="color:#9900CC;">url</span> = <span style="color:#CC0000;">"http://domain.com/feed"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">r.<span style="color:#9900CC;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Template class</strong><br />
ajaxed 1.0 includes a template class called <code>TextTemplate</code>. Very useful if you send emails within your applications. Create an template for the content of your email and parse it using <code>TextTemplate</code>. The ajaxed console provides a simple management of templates. For more details about <code>TextTemplate</code> read the article <a href="http://www.webdevbros.net/2007/06/28/template-component-for-classic-asp/">Template component for classic ASP</a> or check the ajaxed documentation. Simple example</p>
<div class="igBar"><span id="lasp-20"><a href="#" onclick="javascript:showCodeTxt('asp-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-20">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> t = <span style="color:#0000FF; font-weight:bold;">new</span> TextTemplate</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">t.<span style="color:#9900CC;">filename</span> = <span style="color:#CC0000;">"mytemplate.template"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">t.<span style="color:#330066;">add</span> <span style="color:#CC0000;">"name"</span>, <span style="color:#CC0000;">"jack johnson"</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'your email object</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">'i use the first line of the template as the subject of my emails</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mail.<span style="color:#9900CC;">subject</span> = t.<span style="color:#9900CC;">getFirstLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mail.<span style="color:#9900CC;">body</span> = t.<span style="color:#9900CC;">getAllButFirstLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Cache component</strong><br />
Caching data, rss feeds, etc. globally for all visitors can be achieved now with the <code>Cache</code> class. This class has been around for while as well and a details article is available <a href="http://www.webdevbros.net/2006/11/18/cache-object-for-classic-asp/">here</a></p>
<p><strong>Discussion group launched</strong><br />
<img src="http://groups.google.com/groups/img/3nb/groups_bar_de.gif" align="left" height=26 width=132 alt="Google Groups">I have created an own google <a href="http://groups.google.com/group/asp-ajaxed">asp ajaxed discussion group</a> for better support and communication with all ajaxed users.</p>
<p><strong>Minor changes/improvements</strong></p>
<ul>
<li><code>init()</code> must not exist necessarily anymore. If it exists it will be called. if not then not ;) Thanks to the new <code>lib.exec()</code> and <code>lib.getFunction()</code>. Check the reference for more details.</li>
<li><code>str.matching</code> checks a string against a given regular expression pattern. Is much more readable then creating the regex object over and over again.</li>
<li>An error will be raised if there is no <code>main()</code> in your page. Makes it easier to know whats going on...</li>
<li><code>lib.contains</code> is a useful function which lets us check if a given value exists in a given data structure. Currently supported data structures are <code>array</code> and <code>dictionary</code>. Usage is easy: <code>lib.contains(array("yes", "no"), "maybe")</code></li>
<li>script.aculo.us is now part of the library as well. I decided to do this as it plays very nicely with prototype and both are being used in ruby on rails successfully for a long time.</li>
<li>some more minor improvements and bug fixed which you bette look up in the <code>changes.txt</code> or directly in the SVN</li>
</ul>
<p>That was it. Hope you enjoy working with the new version and I am looking forward for your feedback .. which already made the library what it is! Here are some things i am working on already...</p>
<ul>
<li>generic email class</li>
<li>automatically notify admin about ANY errors</li>
<li>plugin infrastructure</li>
<li>asserts for request and response</li>
<li>logging possibilities</li>
<li>validator for business objects</li>
<li>dropdown control and calendar control</li>
</ul>
<p><strong>If you UPGRADE from 0.3</strong> then the only thing you need to do is to move your <code>config.asp</code> into the new <code>/ajaxedConfig/</code> folder. Last but not least create a <code>header.asp</code> and <code>footer.asp</code> in that folder. Put all your html, head and body tags there. You can use the existing ones and adopt them to your needs. Last but not least change <code>AJAXED_ENVIRONMENT</code> to your needed environment. </p>
<p><a href="http://www.webdevbros.net/ajaxed"><strong>Download ajaxed 1.0</strong></a></p>
<p>If you want to live on the edge then grab the <a href="http://code.google.com/p/asp-ajaxed/">latest version from SVN</a>.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/04/15/ajaxed-10-released/&amp;t=ajaxed+1.0+released&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/04/15/ajaxed-10-released/&amp;title=ajaxed+1.0+released&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/04/15/ajaxed-10-released/&amp;title=ajaxed+1.0+released&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+1.0+released;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/04/15/ajaxed-10-released/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/04/15/ajaxed-10-released/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>ajaxed google discussion group</title>
		<link>http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/</link>
		<comments>http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 14:04:15 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/</guid>
		<description><![CDATA[ Today i had some time and have created an own google discussion group (forum) for the ajaxed project. This will make the management of problems much easier for me. At least i hope so :) It should help you guys to communicate about your solutions and issues with ajaxed. Also all issues regarding JSON [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/asp-ajaxed"><img src='http://www.webdevbros.net/wp-content/uploads/2008/03/asp-ajaxed.gif' alt='asp-ajaxed.gif' align='left' /></a> Today i had some time and have created an own google <a href="http://groups.google.com/group/asp-ajaxed">discussion group</a> (forum) for the ajaxed project. This will make the management of problems much easier for me. At least i hope so :) It should help you guys to communicate about your solutions and issues with ajaxed. Also all issues regarding JSON in connection with ASP should go there, and all other classic ASP topics. I can track all these stuff much better then. Thanks for your help and contributions!</p>
<p><a href="http://groups.google.com/group/asp-ajaxed">ajaxed &#038; asp JSON disussion</a></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/&amp;t=ajaxed+google+discussion+group&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/&amp;title=ajaxed+google+discussion+group&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/&amp;title=ajaxed+google+discussion+group&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+google+discussion+group;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2008/03/16/ajaxed-google-discussion-group/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ajaxed 0.3 released</title>
		<link>http://www.webdevbros.net/2007/12/18/ajaxed-03-released/</link>
		<comments>http://www.webdevbros.net/2007/12/18/ajaxed-03-released/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 18:28:01 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ajaxed]]></category>
		<category><![CDATA[classic ASP (VBScript)]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2007/12/18/ajaxed-03-released/</guid>
		<description><![CDATA[i have updated ajaxed (classic asp ajax library) to its 0.3 version. Thanks to all contributors who helped me with their feedback. Here are the updates...

working with prototype 1.6 now
working with JSON utility class 1.4
loading indicator stays now always on top of the screen. before it used to disappear if page scroll was not at [...]]]></description>
			<content:encoded><![CDATA[<p>i have updated <a href="http://www.webdevbros.net/ajaxed/">ajaxed</a> (classic asp ajax library) to its 0.3 version. Thanks to all contributors who helped me with their feedback. Here are the updates...<span id="more-136"></span></p>
<ul>
<li>working with <a href="http://www.prototypejs.org/">prototype 1.6</a> now</li>
<li>working with <a href="http://www.webdevbros.net/2007/12/18/asp-json-utility-class-14-released/">JSON utility class 1.4</a></li>
<li>loading indicator stays now always on top of the screen. before it used to disappear if page scroll was not at the top</li>
<li>loading indicator has no styles by default anymore.. you have to be define them by yourself in your css file. definine the css class 'ajaxLoadingIndicator' and choose your custom style</li>
<li>more test have been added (also for recordsets)</li>
<li>added <code>AJAXED_DBCONNECTION</code> to the <code>config.asp</code> => you can open the DB connection automatically now for each page by default</li>
<li>renamed demo/index.asp to demo/default.asp because iis default installation has this already set</li>
</ul>
<p>upgrading to the new version should be no problem if you did not change the source files of the previous version. The only thing you need to change is to add styles for the loading indicator. This helps us that everyone has its own indicator style ;)</p>
<p>enjoy it <a href='http://www.webdevbros.net/wp-content/uploads/2007/12/ajaxed03.zip' title='ajaxed 0.3'>download ajaxed 0.3</a>. Please post you comments about the new version within this topic.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2007/12/18/ajaxed-03-released/&amp;t=ajaxed+0.3+released&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2007/12/18/ajaxed-03-released/&amp;title=ajaxed+0.3+released&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2007/12/18/ajaxed-03-released/&amp;title=ajaxed+0.3+released&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+0.3+released;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2007/12/18/ajaxed-03-released/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2007/12/18/ajaxed-03-released/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Using a database with ajaxed</title>
		<link>http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/</link>
		<comments>http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 21:50:09 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/</guid>
		<description><![CDATA[Since version 0.2 it is possible to use a database with ajaxed out of the box. The library offers the ability to configure a connection string for the use of ODBC within your pages. After that convenient methods enable access to the database. The following paragraphs give a short insight into the usage of a [...]]]></description>
			<content:encoded><![CDATA[<p>Since version 0.2 it is possible to use a database with ajaxed out of the box. The library offers the ability to configure a connection string for the use of ODBC within your pages. After that convenient methods enable access to the database. The following paragraphs give a short insight into the usage of a database within ajaxed.<span id="more-89"></span><br />
First of all open the <em>config.asp</em> in the root of ajaxed and configure the connection string which is necessary for your database. The constant is called <em>AJAXED_CONNSTRING</em> and needs to hold a valid connection string. Some are already suggested and can be used directly just by uncommenting. Don't forget to change the password, user and database within the predefined ones (for more connection strings check <a href="http://www.connectionstrings.com/">www.connectionstrings.com/</a>). If your database is running on a different machine than the webserver then you need to change the server adress as well.</p>
<p>After that the database is ready to use and there are two ways of using it:</p>
<ol>
<li>Automatically through an <em>AjaxedPage</em> instance or</li>
<li>manually by accessing the <em>Database</em> class directly.</li>
</ol>
<p>Using the database automatically with an instance of the <em>AjaxedPage</em> means that you tell the page that you need a connection to the database (for the time the page is running) and it will take care of it. This is achieved by setting the <em>DBConnection</em> property to <em>true</em>. After this you can access the database from within the <em>init()</em>, <em>callback()</em> and <em>main()</em> procedures. All methods from the <em>Database</em> class are available. The following example demonstrates how to use the configured database. It queries records from the database and displays the data in a <em>div</em> container.</p>
<div class="igBar"><span id="lasp-25"><a href="#" onclick="javascript:showCodeTxt('asp-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-25">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!--#include virtual=<span style="color:#CC0000;">"/ajaxed/ajaxed.asp"</span>--&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> p = <span style="color:#0000FF; font-weight:bold;">new</span> AjaxedPage</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color:#9900CC;">DBConnection</span> = <span style="color:#0000FF; font-weight:bold;">true</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color:#9900CC;">draw</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> : <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> callback<span style="color:#006600; font-weight:bold;">&#40;</span>action<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">if</span> action = <span style="color:#CC0000;">"load"</span> <span style="color:#990099; font-weight:bold;">then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; p.<span style="color:#9900CC;">return</span><span style="color:#006600; font-weight:bold;">&#40;</span>db.<span style="color:#9900CC;">getRecordset</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT column FROM myTable"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#990099; font-weight:bold;">if</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> main<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#0000FF; font-weight:bold;">%&gt;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;script&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">function</span> loaded<span style="color:#006600; font-weight:bold;">&#40;</span>recs<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#990099; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>i = <span style="color:#800000;color:#800000;">0</span>; i &lt;recs.<span style="color:#9900CC;">length</span>; i++<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#008000;">'container').innerHTML += recs[i].column + &quot;&lt;br&gt;&quot;;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">&lt;/script&gt;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;form id=<span style="color:#CC0000;">"frm"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=<span style="color:#CC0000;">"container"</span>&gt;&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;button onclick=<span style="color:#CC0000;">"ajaxed.callback('load', loaded)"</span> type=<span style="color:#CC0000;">"button"</span>&gt;load&lt;/button&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/form&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span> <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span> <span style="color:#0000FF; font-weight:bold;">%&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Clicking the <em>load</em> button will grab all records from <em>myTable</em> and select the column called <em>column</em>. This is achieved with the <em>getRecordset()</em> method which accepts an SQL query and returns an <em>ADODB.Recordset</em>. After the records are fetched we let the page return them within the <em>callback()</em> state of the page. After that the whole recordset is accessible on client side within the JavaScript callback function <em>loaded</em>. The column names have been automatically "transfered" to JavaScript and are therefore accessible.</p>
<p><em>getRecordset()</em> returns a locked recordset from the database. This means you are not allowed to do any modications to it. If you are in need of an "unlocked" recordset you should use <em>getUnlockedRecordset()</em>. This will open the recordset with a static cursor type and its loacation will be on the client. Now modifications can be done and properties like e.g. <em>RecordCount</em> are accessible also.</p>
<p>Sometimes you need to grab just one value from the database. Normally a count of records or even some calculation result. For this the ajaxed Library offers a method called <em>getScalar()</em> which always returns the value of the first column in the first row. It expects an alternative value which will be returned when the value cannot be identified (e.g. the query returned no records, etc). The following example shows the usage:</p>
<div class="igBar"><span id="lasp-26"><a href="#" onclick="javascript:showCodeTxt('asp-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-26">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">numberProducts = db.<span style="color:#9900CC;">getScalar</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT COUNT(*) FROM product"</span>, <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">numberProducts = db.<span style="color:#9900CC;">getScalar</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT name, id FROM product"</span>, <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">numberProducts = db.<span style="color:#9900CC;">getScalar</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT id, name FROM product"</span>, <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The variable <em>numberProducts</em> will always be assigned with an integer value. If there are no records available or the value cannot be parsed into the datatype of the alternative then the alternative value (in this case 0) is being passed through. The first line would count the records and result in a recordset with one row and one column which holds a number. Thus this case would pass the value from the recordset. The second line select all products and the first column is obviously a string column. In this case <em>getScalar()</em> will pass through the alternative value 0 because the name cannot be parsed into an integer. Last but not least the third line selects the ID of the products as the first column and therefore - if IDs are numeric values - the ID of the first product will be passed through.</p>
<p>Do you remember that there was another approach to access the database? Yeah the manual one. The manual approach might be useful e.g. if you are not using the AjaxedPage. Why? There might be several reasons. Maybe you are generating a file, etc. For this it is necessary to load the <em>Database</em> class, instantiate it and open the database connection manually. This would look like the following:</p>
<div class="igBar"><span id="lasp-27"><a href="#" onclick="javascript:showCodeTxt('asp-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-27">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!--#include virtual=<span style="color:#CC0000;">"/ajaxed/ajaxed.asp"</span>--&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> myDB = <span style="color:#0000FF; font-weight:bold;">new</span> Database</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">with</span> myDB</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;.<span style="color:#330066;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"some connectionstring"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#008000;">'when the alternative is a floating number use the comma.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#990099; font-weight:bold;">set</span> RS = .<span style="color:#9900CC;">getScalar</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT totalsales FROM monthlySales"</span>, <span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;.<span style="color:#330066;">close</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#990099; font-weight:bold;">with</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">%&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Last but not least I want to show you how to switch databases within one page. This scenario can be useful if you import/export data between two databases. Lets say we want to grab the data from a table of Database A and bung it into a table of Database B. The following example demonstrates this:</p>
<div class="igBar"><span id="lasp-28"><a href="#" onclick="javascript:showCodeTxt('asp-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-28">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!--#include virtual=<span style="color:#CC0000;">"/ajaxed/ajaxed.asp"</span>--&gt;</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">&lt;%</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">set</span> p = <span style="color:#0000FF; font-weight:bold;">new</span> AjaxedPage</div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color:#9900CC;">DBConnection</span> = <span style="color:#0000FF; font-weight:bold;">true</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color:#9900CC;">draw</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> : <span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">sub</span> main<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#008000;">'selects data from Database A</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#990099; font-weight:bold;">set</span> RS = db.<span style="color:#9900CC;">getRecordset</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"SELECT * FROM tableA"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#008000;">'switches to Database B</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;db.<span style="color:#330066;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"connectionstring of Database B"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#008000;">'add the records from Database A to B</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#990099; font-weight:bold;">while</span> <span style="color:#990099; font-weight:bold;">not</span> RS.<span style="color:#0000FF; font-weight:bold;">eof</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; db.<span style="color:#9900CC;">getRecordset</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"INSERT INTO tableB (name) VALUES ('"</span> &amp; str.<span style="color:#9900CC;">SQLSafe</span><span style="color:#006600; font-weight:bold;">&#40;</span>RS<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"name"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp; <span style="color:#CC0000;">"')"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; RS.<span style="color:#330066;">movenext</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#990099; font-weight:bold;">wend</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#990099; font-weight:bold;">end</span> <span style="color:#0000FF; font-weight:bold;">sub</span></div>
</li>
<li style="font-weight: bold;color:#767676;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF; font-weight:bold;">%&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In order to switch to another database you need just to call the <em>db.open()</em> method with a connection string of your desired database. After that all methods of <em>db</em> are executed against the "new" database. The database connection is closed automatically at the end of page processing. Alternatively you could have created a new instance of <em>Database</em> and have both Databases opened.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/&amp;t=Using+a+database+with+ajaxed&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/&amp;title=Using+a+database+with+ajaxed&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/&amp;title=Using+a+database+with+ajaxed&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Using+a+database+with+ajaxed;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2007/07/16/using-a-database-with-ajaxed/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
		<item>
		<title>ajaxed 0.2 released</title>
		<link>http://www.webdevbros.net/2007/07/16/ajaxed-02-released/</link>
		<comments>http://www.webdevbros.net/2007/07/16/ajaxed-02-released/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 20:46:39 +0000</pubDate>
		<dc:creator>Michal</dc:creator>
				<category><![CDATA[ajaxed]]></category>

		<guid isPermaLink="false">http://www.webdevbros.net/2007/07/16/ajaxed-02-released/</guid>
		<description><![CDATA[Upon releasing the first version of a classic ASP AJAX library called ajaxed I received a lot of positive response. For this reason I have extended the library and released version 0.2 now. The update consists mostly of server side additions which have not really to do with Ajax. Still those additions are very useful [...]]]></description>
			<content:encoded><![CDATA[<p>Upon releasing the first version of a classic ASP AJAX library called ajaxed I received a lot of positive response. For this reason I have extended the library and released version 0.2 now. The update consists mostly of server side additions which have not really to do with Ajax. Still those additions are very useful when working with ajaxed because everything is done on server side. Here is a short excerpt of some additions:</p>
<ul>
<li>A database can be easily configured now and accessed with several convenient methods.</li>
<li>A collection of useful string functions is now directly accessible (check <a href="/2006/11/20/collection-of-vbscript-string-functions-for-classic-asp/">VBScript String functions</a>). Those functions are necessary for all kind of projects you do.</li>
<li><a href="http://www.prototypejs.org">Prototype 1.5.1.1</a> is being used now</li>
</ul>
<p>Have a look at the <a href="/ajaxed/">new version</a> and give me your feedback. I hope that I can find some time to come up with more tutorials.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.webdevbros.net/2007/07/16/ajaxed-02-released/&amp;t=ajaxed+0.2+released&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.webdevbros.net/2007/07/16/ajaxed-02-released/&amp;title=ajaxed+0.2+released&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://www.webdevbros.net/2007/07/16/ajaxed-02-released/&amp;title=ajaxed+0.2+released&amp;t=1 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ajaxed+0.2+released;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=square></script></td> <td><script type="text/javascript">tweetmeme_url='http://www.webdevbros.net/2007/07/16/ajaxed-02-released/'; tweetmeme_style = 'normal';; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.webdevbros.net/2007/07/16/ajaxed-02-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
