<?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>Ladysign Dev Blog &#187; ajax</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Invoke Java servlet with YUI</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/invoke-java-servlet-with-yui/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/invoke-java-servlet-with-yui/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 12:20:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[YUI Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java servlets]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[post data]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=837</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
In one of my previous post I showed you <a href="http://ladysign-apps.com/blog/archives/830"> how to invoke a Java servlet with Ajax/Javascript</a>.<br />
Now I will show you the same [......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/invoke-java-servlet-with-yui/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
In one of my previous post I showed you <a href="http://ladysign-apps.com/blog/archives/830"> how to invoke a Java servlet with Ajax/Javascript</a>.<br />
Now I will show you the same example with the use of Yahoo UI Library (YUI Library).</p>
<p>Make sure you implement the yahoo and connection libraries.<br />
You can download these from the YUI developer network.</p>
<pre class="brush: xml; title: ;">&lt;script type=&quot;text/javascript&quot; src=&quot;static/js/yui/yahoo-min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;static/js/yui/connection-min.js&quot;&gt;&lt;/script&gt;</pre>
<p>The script:</p>
<pre class="brush: jscript; title: ;">&lt;script type=&quot;text/javascript&quot;&gt;
      var request;
      function doSomeRequest(servletName, servletArguments){
          var arg = &quot;myParam=&quot; + getPopupContent(servletArguments).replace(/[\n\r\%]/g,''); //I replaced linebreaks and % which breaks requests.
          YAHOO.util.Connect.asyncRequest('POST', servletName, callback, arg); //note the arg is only for POST methods
          	var callback =
			{
			  success: function(o) {
			  	//do something with the response
			  },
			  failure: function(o) {
			  	//do something with the error
			  }
			}
		}
&lt;/script&gt;</pre>
<p><a href="http://developer.yahoo.com/yui/connection/">Download the files or see more examples on YUI Developer network.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/invoke-java-servlet-with-yui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 popular Javascript Frameworks</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 09:20:37 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Spry]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=648</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Javascript frameworks are for easing development and dynamic web apps.<br />
These toolkits enables you to deal with Ajax calls[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Javascript frameworks are for easing development and dynamic web apps.<br />
These toolkits enables you to deal with Ajax calls in an easy and fun way and it&#8217;s also cross browser safe.</p>
<p>It can be handy, if you know already something about <a href="http://www.json.org">JSON</a>:<br />
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write and it is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition &#8211; December 1999.<br />
JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.</p>
<p>It&#8217;s a personal choice which of the Javascript Frameworks you should choose.<br />
Basically they are all more or less providing you the same functionality, and they all<br />
contain excellent documentation and API&#8217;s with examples.<br />
I will show you the 6 most popular frameworks, and tell you the current version,<br />
download link and which websites these frameworks use. Also the size of the .js file,<br />
which is an important detail.</p>
<table border="1" cellpadding="1" cellspacing="1" align="center">
<tr>
<th></th>
<th align="center"><a href="http://jquery.com/">JQuery</a></th>
<th align="center"><a href="http://www.prototypejs.org">Prototype</a></th>
<th align="center"><a href="http://www.dojotoolkit.org/">Dojo</a></th>
<th align="center"><a href="http://www.mootools.net/">Mootools</a></th>
<th align="center"><a href="http://labs.adobe.com/technologies/spry/home.html">Spry</a></th>
<th align="center"><a href="http://developer.yahoo.com/yui/">YUI</a></th>
</tr>
<tr>
<td><b>Version:</b></td>
<td>1.3.2</td>
<td>1.6.0.3</td>
<td>1.3.0</td>
<td>1.2.2.</td>
<td>1.6.1</td>
<td>2.7.0</td>
</tr>
<tr>
<td><b>Size:</b></td>
<td>56KB / 117kB *</td>
<td>127KB</td>
<td>80KB / 305kB *</td>
<td>64KB / 97kB * </td>
<td>4.88MB</td>
<td>11.7MB</td>
</tr>
<tr>
<td><b>Clients</b></td>
<td><em>Google, Dell, Mozilla, Bank of America (Microsoft, Nokia)</em></td>
<td><em>Apple, CNN, Twitter, Digg, eBAY, Sony, Prada, Wired, Amazon</em></td>
<td><em>Salesforce, IBM, AOL, Apple, Ask.com, SUN, Zend Framework, Lufthansa</em></td>
<td><em>Joomla, Nintendo, Gamespot, W3C, Netvibes</em></td>
<td><em>Adobe</em></td>
<td><em>Yahoo, KLM</em></td>
</tr>
</table>
<p>* = compressed gzipped / uncompressed</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Salesforce Query Functions</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:25:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[s-controls]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=60</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your S-Controls:</p>
<pre class="brush: jscript; title: ;">
/**
 * Get an array with all the possible fields names from a object
 * @param objectType object to get the fields from.
 * @return array with all the fieldnames of the given object
 */
function getFields(objectType) {
	var describeSObjectResult, fields, i;

	describeSObjectResult = sforce.connection.describeSObject(objectType);
	fields = [];
	var length = describeSObjectResult.fields.length;
	for (i = 0; i &lt; length; i++)
	fields[i] = describeSObjectResult.fields[i].name;

	return fields;
}

/**
* Result handler, forwards you to the detail page,
* if there is an error give alert message.
* @param result - can be a (sf query) object, or a textmessage string.
* @param idVal - the id of the detailpage to forward to.
*/
function resultHandler(result, idVal){
	var msg = &quot;&quot;;

	if (typeof(result) == &quot;object&quot;) {
		if (result[0].getBoolean(&quot;success&quot;)) {
			msg = &quot;&quot;;
		} else {
			msg = &quot;Error: &quot; + result[0];
		}
	} else {
		msg = result;
	}
	if (msg != &quot;&quot;){
		alert(msg);
	}
	self.location.href = &quot;/&quot; + idVal;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce date/time functions</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:15:39 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[crm]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[s-controls]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=57</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Oh I loved my previous project, where I had to work with the CRM: Salesforce.<br />
Salesforce coding was fun: S-Controls (ifra[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Oh I loved my previous project, where I had to work with the CRM: Salesforce.<br />
Salesforce coding was fun: S-Controls (iframes), Salesforce Ajax (Javascript with Salesforce Query Language) and Apex (Java like Salesforce serverside coding).</p>
<p>These are handy Salesforce date/time functions which you can use in your S-Controls:</p>
<pre class="brush: jscript; title: ;">
/**
* Return the current time
* @return javascript date time object
*/
function getCurrentSalesForceTime(){
	var currentDateTime = sforce.connection.getServerTimestamp();
	currentDateTime = setStringToDateTime(currentDateTime.timestamp);

	return currentDateTime;
}

/**
* Set Javascript Date Time to Salesforce Date Time;
* @param dateTimeObj - date time string
* @return salesforce date time object
**/
function setStringToDateTime(dateTimeObj){
	var dateTimeObj;

	if (dateTimeObj != null) {
		dateTimeObj = sforce.internal.stringToDateTime(dateTimeObj);
	}

	return dateTimeObj;
}

/**
* Set Salesforce Date Time Object to Javascript Date Time
* @param dateTimeObj - Salesforce date time object
* @return string date time
**/
function setDateTimeToString(dateTimeObj){
	var dateTimeObj;

	if (dateTimeObj != null) {
		dateTimeObj = sforce.internal.dateTimeToString(dateTimeObj);
	}

	return dateTimeObj;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

