<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7011889470751991096</id><updated>2012-02-16T10:27:09.043-08:00</updated><category term='toolkit'/><category term='flash'/><category term='javascript'/><category term='scriplet'/><category term='Patch'/><category term='development'/><category term='gtalk'/><category term='punjab'/><category term='jwchat'/><category term='demo'/><category term='xul'/><category term='library'/><category term='firefox'/><category term='tri-license'/><category term='java2script'/><category term='xulrunner'/><category term='python'/><category term='extension'/><category term='browser'/><category term='e4x'/><category term='license'/><category term='servlet'/><category term='xiff'/><category term='Apache'/><category term='xhtml'/><category term='mod_jk'/><category term='xmpp4moz'/><category term='stanza'/><category term='dom mutation'/><category term='office'/><category term='bot'/><category term='xmpp'/><category term='java'/><category term='tool'/><category term='MPL'/><category term='ajax'/><category term='tutorial'/><category term='example'/><category term='schema'/><category term='book'/><category term='links'/><category term='smack'/><category term='sameplace suite'/><category term='GPL'/><category term='Tomcat'/><category term='logistic'/><category term='reference'/><category term='Eclipse'/><category term='server'/><category term='caution'/><category term='design'/><category term='Update'/><category term='gtalkr'/><category term='groupchat'/><category term='ide'/><category term='problem'/><title type='text'>TrueTalk Dev</title><subtitle type='html'>Jabber, AJAX</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5638177960644155990</id><published>2007-09-30T18:47:00.001-07:00</published><updated>2007-09-30T18:51:21.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Getting browser's progress status</title><content type='html'>Ever wonder how to correctly get the page's progress of the browser (loading, transferring, waiting, etc)? Well here it is:&lt;br /&gt;&lt;br /&gt;There are several states that can be detected using this interface&lt;br /&gt;&lt;ul&gt;&lt;li&gt;onStateChange&lt;/li&gt;&lt;li&gt;onLocationChange&lt;/li&gt;&lt;li&gt;onProgressChange&lt;/li&gt;&lt;li&gt;onStatusChange&lt;/li&gt;&lt;li&gt;onSecurityChange&lt;/li&gt;&lt;li&gt;onLinkIconAvailable&lt;/li&gt;&lt;/ul&gt; even though their names can seem self-explanatory, you better check the &lt;a href="http://developer.mozilla.org/en/docs/XUL_Questions_and_Answers#What_is_an_example_of_addProgressListener.3F"&gt;full documentation.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1) create an object that will withhold the Progress Listener Interface&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var oProgressListener = new Object();    //on top of all codes, or with global scope&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2) get the Progress Listener interface and assign preliminary values.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;wpl = Components.interfaces.nsIWebProgressListener;&lt;br /&gt;&lt;br /&gt;//I'm still not very sure what this function does :D&lt;br /&gt;oProgressListener.QueryInterface = function(aIID) {&lt;br /&gt;            if (aIID.equals(oProgressListener.wpl) ||&lt;br /&gt;                aIID.equals(Components.interfaces.nsISupportsWeakReference) ||&lt;br /&gt;                aIID.equals(Components.interfaces.nsISupports)) return this;&lt;br /&gt;                  throw Components.results.NS_NOINTERFACE;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;3) assign appropriate functions to the state you wants to:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//detect URL changes&lt;br /&gt;oProgressListener.onLocationChange = function(aProgress, aRequest, aURI) {&lt;br /&gt;   &lt;br /&gt;        alert('my URL was changed');&lt;br /&gt;        return 0;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//detect the starting of loading a new page / document&lt;br /&gt;oProgressListener.onStateChange = function(aProgress, aRequest, aFlag, aStatus) {&lt;br /&gt;    if (aFlag &amp;amp; oProgressListener.wpl.STATE_IS_DOCUMENT){&lt;br /&gt;        alert('New page is being loaded');  &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//detect when a page is fully loaded&lt;br /&gt;if (aFlag &amp;amp; oProgressListener.wpl.STATE_STOP) {&lt;br /&gt;    if ( aFlag &amp;amp; oProgressListener.wpl.STATE_IS_DOCUMENT ) {&lt;br /&gt;        alert('New page has finished loading');  &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;4) Associate the progress listener for a "browser" to a listener object&lt;br /&gt;&lt;code&gt;&lt;br /&gt;    browser.addProgressListener( oProgressListener,&lt;br /&gt;        Components.interfaces.nsIWebProgress.NOTIFY_STATE_WINDOW);&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5638177960644155990?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5638177960644155990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5638177960644155990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5638177960644155990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5638177960644155990'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/getting-browser-progress-status.html' title='Getting browser&amp;#39;s progress status'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-280490127746942884</id><published>2007-09-30T18:19:00.001-07:00</published><updated>2007-09-30T18:27:22.534-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>How to put log messages in Firefox's Error Console</title><content type='html'>Found out about how to add comments/logs to Firefox built-in Error Console. Really helps in debugging process.&lt;br /&gt;&lt;br /&gt;1) get the Console Service component&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var ConsSrv = Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2) write your logs!&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ConsSrv.logStringMessage('here is my logs.. Hello!!!!');&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-280490127746942884?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/280490127746942884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=280490127746942884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/280490127746942884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/280490127746942884'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/how-to-put-log-messages-in-firefox.html' title='How to put log messages in Firefox&amp;#39;s Error Console'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6375525400835431375</id><published>2007-09-21T08:26:00.001-07:00</published><updated>2007-09-21T09:27:40.143-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Change multiple textbox value simultenously</title><content type='html'>Ever tried duplicating values from one main textbox to another (in &lt;span style="font-style: italic;"&gt;XUL&lt;/span&gt;)? or to many others? Right after every keypresses from the user? Well, the JavaScript way is to call the &lt;span style="font-style: italic;"&gt;onchange &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeypress &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeydown &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeyup &lt;/span&gt;event for the main textbox, and when the event occurs, duplicate it's content to the target textboxes.&lt;br /&gt;&lt;br /&gt;Well, this is not the same in case of &lt;span style="font-style: italic;"&gt;XUL &lt;/span&gt;textboxes. Using &lt;span style="font-style: italic;"&gt;onchange &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeypress &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeydown &lt;/span&gt;/ &lt;span style="font-style: italic;"&gt;onkeyup &lt;/span&gt;will always get the second latest char, as illustrated in this example:&lt;br /&gt;&lt;br /&gt;Main textbox&lt;br /&gt;-------------------------&lt;br /&gt;| 12345         |&lt;br /&gt;-------------------------&lt;br /&gt;&lt;br /&gt;Duplicating textbox&lt;br /&gt;-------------------------&lt;br /&gt;| 1234           |&lt;br /&gt;-------------------------&lt;br /&gt;&lt;br /&gt;So the correct way is to use the &lt;span style="font-weight: bold;"&gt;oninput &lt;/span&gt;event handler, then you'll get the latest update from the main textbox.&lt;br /&gt;&lt;br /&gt;Sample code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;textbox id="main" oninput="duplicateValue()" /&amp;gt;&lt;br /&gt;&amp;lt;textbox id="duplicate" /&amp;gt;&lt;br /&gt;&lt;br /&gt;function duplicateValue()&lt;br /&gt;{&lt;br /&gt;        var main = document.getElementById('main');&lt;br /&gt;        var duplicate = document.getElementById('duplicate');&lt;br /&gt;&lt;br /&gt;        duplicate.value = main.value;&lt;br /&gt;       &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6375525400835431375?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6375525400835431375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6375525400835431375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6375525400835431375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6375525400835431375'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/change-multiple-textbox-value.html' title='Change multiple textbox value simultenously'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6374734141960022006</id><published>2007-09-21T08:17:00.001-07:00</published><updated>2007-09-21T10:18:44.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Running multiple instances of firefox</title><content type='html'>Here is &lt;a href="http://lifehacker.com/software/firefox/geek-to-live--manage-multiple-firefox-profiles-231646.php"&gt;a very helpful article&lt;/a&gt; that elaborates (with pictures) on how to run multiple instances of Firefox(es) at the same time. This may be a requirement if you are trying to develop a Firefox extension and need to test it on 2 or more Firefox windows at the same time.&lt;br /&gt;&lt;br /&gt;ref:&lt;br /&gt;&lt;a href="http://lifehacker.com/software/firefox/geek-to-live--manage-multiple-firefox-profiles-231646.php"&gt;http://lifehacker.com/software/firefox/geek-to-live--manage-multiple-firefox-profiles-231646.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6374734141960022006?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6374734141960022006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6374734141960022006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6374734141960022006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6374734141960022006'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/running-multiple-instances-of-firefox.html' title='Running multiple instances of firefox'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4269866072588817212</id><published>2007-09-21T08:14:00.001-07:00</published><updated>2007-09-21T09:26:59.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Concatenating Object with String using eval()</title><content type='html'>eval() is a neat function that evaluates a string and executes it as if it was script&lt;br /&gt;code.&lt;br /&gt;&lt;br /&gt;Consider this code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function displayItem(itemNo){&lt;br /&gt;    var item1 = "111";&lt;br /&gt;    var item2 = "222";&lt;br /&gt;    var item3 = "333";&lt;br /&gt;&lt;br /&gt;    eval("alert(item"+itemNo+")"); // the 'item' variable is concatenated with the parameter passed&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and when call with this statement:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;displayItem(1);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;it will alert:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;111&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;or in other case:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;displayItem(3);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;it will alert:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;333&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4269866072588817212?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4269866072588817212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4269866072588817212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4269866072588817212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4269866072588817212'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/concatenating-object-with-string-using.html' title='Concatenating Object with String using eval()'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4527483144154083423</id><published>2007-09-21T07:51:00.001-07:00</published><updated>2007-09-21T09:26:52.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Getting X node value</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Consider the following stanza:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;message&amp;gt;&lt;br /&gt;   &amp;lt;body&amp;gt;bar&amp;lt;/body&amp;gt;&lt;br /&gt;   &amp;lt;x xmlns="myns"&amp;gt;&lt;br /&gt;         &amp;lt;content&amp;gt;foo&amp;lt;/content&amp;gt;&lt;br /&gt;   &amp;lt;/x&amp;gt;&lt;br /&gt;&amp;lt;/message&amp;gt;&lt;br /&gt;&lt;br /&gt;which is then passed to a function called getFoo(message), that will extract the value of &amp;lt;content&amp;gt;. I was having trouble getting that value using message.stanza.x.content, so I found an alternative way, by parsing the xml stanza through xml string.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What we need to do:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//declare a namespace var to make things easier...to read&lt;br /&gt;ns = "myns";&lt;br /&gt;&lt;br /&gt;//get the &amp;lt;x&amp;gt; node only&lt;br /&gt;var x = message.stanza.ns::x;&lt;br /&gt;     &lt;br /&gt;//extracting the position value&lt;br /&gt;var foovalue = loadXMLString(x);&lt;br /&gt;&lt;br /&gt;//function to parse through XML String .. from w3schools.com&lt;br /&gt;function loadXMLString(XMLtext)&lt;br /&gt;{&lt;br /&gt;   //alert(XMLtext);&lt;br /&gt;   var parser=new DOMParser();&lt;br /&gt;   var doc=parser.parseFromString(XMLtext,"text/xml");&lt;br /&gt; &lt;br /&gt;   // documentElement always represents the root node&lt;br /&gt;   var x=doc.documentElement;&lt;br /&gt; &lt;br /&gt;   return     x.childNodes[1].childNodes[0].nodeValue; //the &amp;lt;content&amp;gt; value..... Why so many childNodes? see below.&lt;br /&gt;         &lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why so many childNodes?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Even though the xml string we extracted (&amp;lt;x&amp;gt; node only) will be something like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;x xmlns="myns"&amp;gt;&lt;br /&gt;     &amp;lt;content&amp;gt;foo&amp;lt;/content&amp;gt;&lt;br /&gt;&amp;lt;/x&amp;gt;&lt;br /&gt;&lt;br /&gt;In plain eyes, it looks like &amp;lt;x&amp;gt; have only 1 child node (content), but instead it has &lt;span style="font-weight: bold;"&gt;3 nodes&lt;/span&gt; actually. The real stanza would be something like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;x xmlns="myns"&amp;gt;&lt;br /&gt;   --- invisible textnode ---&lt;br /&gt;     &amp;lt;content&amp;gt;foo&amp;lt;/content&amp;gt;&lt;br /&gt;   --- invisible textnode ---&lt;br /&gt;&amp;lt;/x&amp;gt;&lt;br /&gt;&lt;br /&gt;you can prove this by displaying the nodeType for all the children:&lt;br /&gt;&lt;br /&gt;x.childNodes[0].nodeType; // text&lt;br /&gt;x.childNodes[1].nodeType; // element (&amp;lt;content&amp;gt;)&lt;br /&gt;x.childNodes[2].nodeType; // text&lt;br /&gt;&lt;br /&gt;ref:&lt;br /&gt;&lt;a href="http://www.w3schools.com/dom/dom_parser.asp"&gt;http://www.w3schools.com/dom/dom_parser.asp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://truetalkdev.blogspot.com/2007/06/sps-chat-events-stanzas.html"&gt;http://truetalkdev.blogspot.com/2007/06/sps-chat-events-stanzas.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4527483144154083423?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4527483144154083423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4527483144154083423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4527483144154083423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4527483144154083423'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/getting-node-value.html' title='Getting X node value'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6066371074566181177</id><published>2007-09-04T19:03:00.001-07:00</published><updated>2007-09-04T19:06:12.239-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Get the previous sibling of a node</title><content type='html'>&lt;a href="http://10.111.10.184/torrents.php?search=%5BJdrama%5D+Sushi+Oji%21+-+ep1&amp;amp;category=0&amp;active=0"&gt;&lt;/a&gt;Consider this DOM tree:&lt;br /&gt;&lt;br /&gt;&amp;lt;book&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Magic Mayhem&amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;author&amp;gt;Merlin&amp;lt;/author&amp;gt;&lt;br /&gt;    &amp;lt;publisher&amp;gt;King Arthur Inc.&amp;lt;/publisher&amp;gt;&lt;br /&gt;&amp;lt;/book&amp;gt;&lt;br /&gt;&lt;br /&gt;and you would like to know who is the &lt;span style="font-weight: bold;"&gt;TITLE &lt;/span&gt;of the book, by passing the &lt;span style="font-weight: bold;"&gt;AUTHOR &lt;/span&gt;node to a function, i.e: &lt;span style="font-weight: bold;"&gt;getSibling(node);&lt;/span&gt; . You may use a handy function called element.previousSibling but there is matters to consider.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Must use a loop&lt;/span&gt;&lt;br /&gt;The correct way (in IE &amp; Mozilla) to get the previous sibling of a certain node is by using a loop that iterates through the child nodes:&lt;br /&gt;&lt;br /&gt;function get_previoussibling(n)&lt;br /&gt;  {&lt;br /&gt;//n = &amp;lt;author&amp;gt;&lt;br /&gt;  var x=n.previousSibling;&lt;br /&gt;  while (x.nodeType!=1)&lt;br /&gt;    {&lt;br /&gt;    x=x.previousSibling;&lt;br /&gt;    }&lt;br /&gt;  return x;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;The nodeType = 1 will only be TRUE if the element is an element node (not a textnode or any other nodes). So the loop will keep on iterating until it find the correct element node (&amp;lt;title&amp;gt;) and returns that node. However, this may requires hevery processing when we have thousands of child nodes. Hence, if you are sure and know where is the place [index] of the child node you want, you may try this instead:&lt;br /&gt;&lt;br /&gt;//n = &amp;lt;author&amp;gt;&lt;br /&gt;var prevSibling = document.getElementById(n).parentNode.childNodes[0]; //returns &amp;lt;title&amp;gt; --- no loops required.&lt;br /&gt;&lt;br /&gt;ref:&lt;br /&gt;&lt;a href="http://www.w3schools.com/dom/prop_element_previoussibling.asp"&gt;http://www.w3schools.com/dom/prop_element_previoussibling.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6066371074566181177?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6066371074566181177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6066371074566181177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6066371074566181177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6066371074566181177'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/get-previous-sibling-of-node.html' title='Get the previous sibling of a node'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3577732186241230901</id><published>2007-09-04T18:59:00.001-07:00</published><updated>2007-09-04T19:05:59.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Detecting mouse over event</title><content type='html'>&lt;a href="http://10.111.10.184/torrents.php?search=%5BJdrama%5D+Sushi+Oji%21+-+ep1&amp;amp;category=0&amp;active=0"&gt;&lt;/a&gt;I was trying to register an event handler with a div's onmouseover event, there's something interesting that I found.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;div.onmouseover = alert('yatta!');&lt;/span&gt;&lt;br /&gt;- this event will be triggered every time the div is appended to another element (weird?), because u cant trigger a function with params with this statement.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;div.setAttribute("onmouseover", "alert('yatta!');");&lt;/span&gt;&lt;br /&gt;- this event will be triggered only when the mouse is over the div&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3577732186241230901?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3577732186241230901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3577732186241230901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3577732186241230901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3577732186241230901'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/09/detecting-mouse-over-event.html' title='Detecting mouse over event'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-176864713284269424</id><published>2007-08-26T21:46:00.001-07:00</published><updated>2007-08-26T22:09:47.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Load image from chrome</title><content type='html'>&lt;a href="http://www.deimonhigh.com/reader/manga/Eyeshield21/Chapter%20246/"&gt;  &lt;/a&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;Previously, we load images from my googlepage. Now there's a faster way, that is, loading it from Chrome. What we need to do is just include this in chrome.manifest:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;i&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;skin&lt;span style=""&gt;      &lt;/span&gt;exte_name&lt;span style=""&gt;  &lt;/span&gt;classic/1.0&lt;span style=""&gt;  &lt;/span&gt;chrome/skin/classic/&lt;/span&gt;&lt;/i&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;and load all images into the \chrome\skin\classic folder.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;after that, we can simply load image using:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;img.src = "chrome://exte_name/skin/image_name.jpg";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-176864713284269424?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/176864713284269424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=176864713284269424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/176864713284269424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/176864713284269424'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/load-image-from-chrome.html' title='Load image from chrome'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5591657255726717998</id><published>2007-08-26T21:17:00.001-07:00</published><updated>2007-08-26T22:09:34.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>drawWindow can't grab flash videos?</title><content type='html'>&lt;a href="http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas#Rendering_Web_Content_Into_A_Canvas"&gt;drawWindow()&lt;/a&gt; is a handy function included with Mozilla's  &lt;a href="http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas"&gt;&amp;lt;canvas&amp;gt;&lt;/a&gt; tag. With it you can capture or grab the snapshot of what's in the content area of your browser.&lt;br /&gt;&lt;br /&gt;Since it only takes snapshots, sometimes, it can grab flash video, but only after the video has finished loading. (proved by &lt;a href="http://ted.mielczarek.org/code/mozilla/tabpreview/"&gt;tabpreview&lt;/a&gt;)&lt;span style=";font-family:Arial;font-size:10;"  &gt; and will only get 1 frame of the video at 1 time, so will look awkward.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5591657255726717998?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5591657255726717998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5591657255726717998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5591657255726717998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5591657255726717998'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/drawwindow-can-grab-flash-videos.html' title='drawWindow can&amp;#39;t grab flash videos?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6974640929984166263</id><published>2007-08-26T21:06:00.001-07:00</published><updated>2007-08-26T22:08:52.494-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Setting online/offline to buddies</title><content type='html'>&lt;a href="http://www.deimonhigh.com/reader/manga/Eyeshield21/Chapter%20244/"&gt;&lt;/a&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;- able to get each incoming presence, using channel&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;- can't re-populate buddy list&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;- when disable channel and get presence only using xmpp.cache, it detects buddies on re-login only&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;-random development notes that relates to presence:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocDevelopmentNotes"&gt;http://dev.hyperstruct.net/xmpp4moz/wiki/DocDevelopmentNotes&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6974640929984166263?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6974640929984166263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6974640929984166263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6974640929984166263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6974640929984166263'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/setting-onlineoffline-to-buddies.html' title='Setting online/offline to buddies'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-1443622113368663114</id><published>2007-08-13T19:10:00.001-07:00</published><updated>2007-08-13T19:25:12.872-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Checking whether windows has focus or not</title><content type='html'>- first... set focus on the window first with window.focus&lt;br /&gt;- then.. add event listener to the window onblur event :&lt;br /&gt;    window.onblur = afunction()&lt;br /&gt;- you're set!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Issues:&lt;br /&gt;onBlur = &lt;/span&gt;called when lost focus&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;onFocus =&lt;/span&gt; called when got focus&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;There are 2 big areas that may clashes with focus, namely &amp;lt;window&amp;gt; and document &amp;lt;body&amp;gt;. Normally we want to detect when the user is not 'looking' at the browser window, maybe while doing work in MS Word. But if the last focus was given to the &amp;lt;body&amp;gt;, not &amp;lt;window&amp;gt;, even when you are looking at the browser window (but with a body element, such as a textbox is currently in focus), the onBlur event for window will be triggered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-1443622113368663114?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/1443622113368663114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=1443622113368663114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1443622113368663114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1443622113368663114'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/checking-whether-windows-has-focus-or.html' title='Checking whether windows has focus or not'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6319121703139001161</id><published>2007-08-13T18:53:00.001-07:00</published><updated>2007-08-13T19:25:05.748-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Getting image width and height</title><content type='html'>- attach a function that gets the width and height of an image to the onload event for each images.&lt;br /&gt;- once the images is finished loading, the function will be called, and we can get the values.&lt;br /&gt;- 3 ways of attaching function to event:&lt;br /&gt;myImage.setAttribute("onload", "getWH();");&lt;br /&gt;myImage.onload = getWH;&lt;br /&gt;myImage.addEventListener("load", getWH, true);&lt;br /&gt;&lt;br /&gt;- we can pass parameters for the function only using the 1st method.&lt;br /&gt;- loading animated gif requires longer time than still gif.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6319121703139001161?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6319121703139001161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6319121703139001161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6319121703139001161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6319121703139001161'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/getting-image-width-and-height.html' title='Getting image width and height'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3393355424384726672</id><published>2007-08-13T18:52:00.001-07:00</published><updated>2007-08-13T19:24:53.766-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Image loaded directly inside browser, had no &amp;lt;head&amp;gt; tag</title><content type='html'>- try loading an image directly using a URL ending with image format extensions (.jpg, .png, .bmp)&lt;br /&gt;- using DOM Inspector, try to view the hierarchy, there's no &amp;lt;head&amp;gt; tag !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3393355424384726672?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3393355424384726672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3393355424384726672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3393355424384726672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3393355424384726672'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/image-loaded-directly-inside-browser.html' title='Image loaded directly inside browser, had no &amp;amp;lt;head&amp;amp;gt; tag'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8606909155815034385</id><published>2007-08-02T21:00:00.001-07:00</published><updated>2007-08-04T22:44:34.080-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stanza'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp'/><title type='text'>XEP-0104: HTTP Scheme for URL Data</title><content type='html'>&lt;a href="http://www.xmpp.org/extensions/xep-0104.html"&gt;XEP-0104: HTTP Scheme for URL Data&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An article that relates to sending URLs inside xmpp stanza.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8606909155815034385?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8606909155815034385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8606909155815034385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8606909155815034385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8606909155815034385'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/xep-0104-http-scheme-for-url-data.html' title='XEP-0104: HTTP Scheme for URL Data'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6168645035339517289</id><published>2007-08-02T20:18:00.001-07:00</published><updated>2007-08-02T20:19:29.212-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='reference'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Animation-like behaviour in Javascript</title><content type='html'>&lt;a href="http://truetalkdev.blogspot.com/"&gt;&lt;/a&gt;I came across a website called &lt;a href="http://www.janis.or.jp/users/segabito/JavaScriptMaryo.html"&gt;Super Maryo World&lt;/a&gt; :D As you can figure out by its name, its another remake of the infamous Super Mario Bros. What catches my attention is that it's a game, created entirely in Javascript and can be played in the browser!&lt;br /&gt;&lt;br /&gt;To satisfy my curiosity, I tried to somewhat try to code the character movements (move left, right and jump). It does requires some pretty tricky algo.&lt;br /&gt;&lt;br /&gt;I was trying to move a div around. First I start of by some basic algo, which is:&lt;br /&gt;&lt;br /&gt;OnPress Left&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move Div Left by 10px&lt;br /&gt;&lt;br /&gt;OnPress Right&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move Div Right by 10px&lt;br /&gt;&lt;br /&gt;OnPress Shift&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move Div Up by 10px&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;Issues:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There's a 0.5 second pause after first movement of 10px, when pressing LEFT or RIGHT before the div continuously moving&lt;/li&gt;&lt;li&gt;You can only jump and move... by pressing UP, then DIRECTIONs, not by pressing DIRECTIONs first, then UP.&lt;/li&gt;&lt;/ul&gt;I'm not quite sure what is really the problem, but I do know that pressing keys may cause events to 'bubble' up (events are collected before it triggers). So it doesn't feels 'real'&lt;br /&gt;&lt;br /&gt;Hence, inspired by ActionScript's onEnterFrame() method, a more realistic approach would be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use timer to create movements and jump&amp;nbsp; &lt;/span&gt;&lt;br /&gt;OnPress Left&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; startTimer To call MoveDiv(left)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;  When timer expires, calls MoveDiv(left) recursively while pressing LEFT&lt;br /&gt;&lt;br /&gt;OnPress Right&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; startTimer To call MoveDiv(right)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;  When timer expires, calls MoveDiv(right) recursively while pressing RIGHT&lt;br /&gt;&lt;br /&gt;OnPress Shift&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startTimer To call MoveDiv(up)&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;  When timer expires, calls MoveDiv(up) recursively while pressing UP&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;and also you must put RETURN FALSE onkeypress ENTER key, to avoid unwanted auto-move bugs :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6168645035339517289?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6168645035339517289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6168645035339517289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6168645035339517289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6168645035339517289'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/08/animation-like-behaviour-in-javascript.html' title='Animation-like behaviour in Javascript'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8768931183396031874</id><published>2007-07-31T04:34:00.001-07:00</published><updated>2007-08-08T05:09:01.073-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Get the viewing plane .. correctly</title><content type='html'>&lt;a href="http://truetalkdev.blogspot.com/"&gt;&lt;/a&gt;As I've mentioned in previous post, we can use window.innerHeight to get the current viewing plane for the browser. However, since there are 2 documents inside a browser, putting them in either of them gave different values.&lt;br /&gt;&lt;br /&gt;- reason:&lt;br /&gt;  - window.innerHeight called in Chrome level, return the browser's height&lt;br /&gt;  - window.innerHeight called in document level, return the viewpoint's height&lt;br /&gt;&lt;br /&gt;- fixed using &lt;span style="font-weight: bold;"&gt;document.defaultView&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a diagram taken from &lt;a href="http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code#Accessing_the_elements_of_the_top-level_document_from_a_child_window"&gt;MDC&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#document&lt;br /&gt;  window                 main-window&lt;br /&gt;     ...&lt;br /&gt;     browser&lt;br /&gt;         #document&lt;br /&gt;              window         myExtensionWindow)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see, since they are on different levels, calling window.innerHeight will gave different values. The higher &amp;lt;window&amp;gt; is the window for the whole browser, whereas the lower &amp;lt;window&amp;gt; is the window of the viewing plane.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8768931183396031874?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8768931183396031874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8768931183396031874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8768931183396031874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8768931183396031874'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/get-viewing-plane-correctly.html' title='Get the viewing plane .. correctly'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6662771964245114066</id><published>2007-07-31T04:25:00.001-07:00</published><updated>2007-07-31T04:26:26.717-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>get image size after image is fully loaded</title><content type='html'>&lt;a href="http://truetalkdev.blogspot.com/"&gt;&lt;/a&gt;If we need to get the size (width and height) of an image, in order to manipulate it, we first need to make sure that the image is fully loaded inside the web document. But at most time, we may not need to render the image, we just need the size. so here is a neat way to do this:&lt;br /&gt;&lt;br /&gt;- using Image() object to load an image internally, without displaying the image in the doc, and then get the size.&lt;br /&gt;&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 800px; height: 226px;"&gt;&lt;span style="font-size:100%;"&gt;function getWidthAndHeight() {&lt;br /&gt;   alert("'" + this.name + "' is " + this.width + " by " + this.height + " pixels in size.");&lt;br /&gt;   return true;&lt;br /&gt;}&lt;br /&gt;function loadFailure() {&lt;br /&gt;   alert("'" + this.name + "' failed to load.");&lt;br /&gt;   return true;&lt;br /&gt;}&lt;br /&gt;var myImage = new Image();&lt;br /&gt;myImage.name = "someimg.jpg";&lt;br /&gt;myImage.onload = getWidthAndHeight;&lt;br /&gt;myImage.onerror = loadFailure;&lt;br /&gt;myImage.src = "someimg.jpg";&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;With this code, the image is 'silently' being loaded into the current document. The image is attached with an 'onload' event listener, that calls a function named getWidthAndHeight() Note that onload event for images are only triggered after the image is fully downloaded to the browsers cache. So then, they will be no problem for us to get the correct size.&lt;br /&gt;&lt;br /&gt;Thanks to phpnovice for his solution taken from &lt;a href="http://www.webdeveloper.com/forum/showthread.php?t=108392"&gt;webdeveloper.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6662771964245114066?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6662771964245114066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6662771964245114066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6662771964245114066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6662771964245114066'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/get-image-size-after-image-is-fully.html' title='get image size after image is fully loaded'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2082092992260435648</id><published>2007-07-31T04:12:00.001-07:00</published><updated>2007-07-31T04:15:54.797-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Detect when user resizes browser</title><content type='html'>&lt;a href="http://truetalkdev.blogspot.com/search?q=window."&gt;&lt;/a&gt;There is a couple of ways to listens to the event triggered when a user resizes Firefox:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;body.onresize&lt;/span&gt;&lt;br /&gt;    - when put an alert function for testing purpose, it alerts only once&lt;br /&gt;    - must be put inside loaded doc body, otherwise can't utilize 'body' var&lt;br /&gt;    - not valid HTML 4.0 spec&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;window.onresize&lt;/span&gt;&lt;br /&gt;    - alert twice&lt;br /&gt;    - can be put on chrome level or in document level&lt;br /&gt;    - valid HTML 4.0 spec&lt;br /&gt;&lt;br /&gt;after some more tests:&lt;br /&gt;- self.screen.availHeight = the whole screen height - taskbar height // not reliable&lt;br /&gt;- window.innerHeight&lt;br /&gt;    - seems to be working accurately&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2082092992260435648?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2082092992260435648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2082092992260435648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2082092992260435648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2082092992260435648'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/detect-when-user-resize-browser.html' title='Detect when user resizes browser'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5503136514614415673</id><published>2007-07-23T21:56:00.001-07:00</published><updated>2007-07-24T02:02:45.979-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reference'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>XPCNativeWrapper : The DOM and Javascript Access Protector</title><content type='html'>During my search for solution for the previously mentioned problem, I stumbled upon a &lt;a href="http://developer.mozilla.org/en/docs/XPCNativeWrapper"&gt;XPCNativeWrapper&lt;/a&gt;, a wrapper that wrap around DOMs and javascript codes, to protect if from XSS (Cross side server script) or unprivileged codes that may change the behavior of one's website or in Mozilla's case, the browser itself.&lt;br /&gt;&lt;br /&gt;The praised functionality of a browser to allow DOM manipulation has make web-based and browser-based development more exciting. Yet, malicious codes will always try to do unethical thing, such as steal usernames and passwords as &lt;a href="http://userscripts.org/forums/3/topics/704"&gt;reported by Greasemonkey community&lt;/a&gt;.&lt;br /&gt;Hence, a protector such as this is adequate.&lt;br /&gt;&lt;br /&gt;Thanks to developers of Mozilla-based browsers, XPCNW has been enabled by default for Firefox version 1.5 and above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5503136514614415673?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5503136514614415673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5503136514614415673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5503136514614415673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5503136514614415673'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/xpcnativewrapper-dom-and-javascript.html' title='XPCNativeWrapper : The DOM and Javascript Access Protector'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-989122857139907243</id><published>2007-07-23T01:44:00.001-07:00</published><updated>2007-07-23T01:51:35.823-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Master document handling issues on different OSes</title><content type='html'>A new phenomenon has been discovered as we were testing TT on different OSes, just to try and see whether TT is stable. Here is the summary:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Test run on:&lt;/span&gt;&lt;br /&gt;WinXP Home..... OK&lt;br /&gt;Ubuntu 7.04..... OK&lt;br /&gt;WinXP Pro........ NOT WORKING&lt;br /&gt;Mac Os X........ NOT WORKING&lt;br /&gt;&lt;br /&gt;The error returned was it &lt;span style="font-weight: bold;"&gt;can't find a toolbar with the given id&lt;/span&gt;, which I placed clearly on top of the status bar. I seems strange that the same codes won't work on different OSes.&lt;br /&gt;&lt;br /&gt;After further research and scouring into one of my firefox extension (DownBar), which I'm trying to replicate, I realized that we need to specify the parent node of a an XUL element we are trying to access, as explicitly as possible. Consider my previous codes:&lt;br /&gt;&lt;br /&gt;&amp;lt;overlay&amp;gt;&lt;br /&gt;   ....&lt;br /&gt;   &amp;lt;toolbox align="end" insertbefore="status-bar" hidden="true"&amp;gt;&lt;br /&gt;         &amp;lt;toolbar id="tlbid"&amp;gt;&lt;br /&gt;             &amp;lt;!--content will be added dynamically--&amp;gt;&lt;br /&gt;         &amp;lt;/toolbar&amp;gt;&lt;br /&gt;   &amp;lt;/toolbox&amp;gt;  &lt;br /&gt;   ....&lt;br /&gt;&amp;lt;/overlay&amp;gt;&lt;br /&gt;&lt;br /&gt;and I was trying to get the &amp;lt;toolbar&amp;gt; element by using document.getElementById('tlbid'). Apparently this works only on WinXP Home and Ubuntu. To overcome this bug, we need to specify the parent of &amp;lt;toolbar&amp;gt; which is actually &amp;lt;window&amp;gt;. so the correct codes will be:&lt;br /&gt;&lt;br /&gt;&amp;lt;overlay&amp;gt;&lt;br /&gt;   ....&lt;br /&gt;   &amp;lt;window id="main-window"&amp;gt;&lt;br /&gt;       &amp;lt;toolbox align="end" insertbefore="status-bar" hidden="true"&amp;gt;&lt;br /&gt;         &amp;lt;toolbar id="tlbid"&amp;gt;&lt;br /&gt;             &amp;lt;!--content will be added dynamically--&amp;gt;&lt;br /&gt;         &amp;lt;/toolbar&amp;gt;&lt;br /&gt;       &amp;lt;/toolbox&amp;gt;  &lt;br /&gt;   &amp;lt;/window&amp;gt;&lt;br /&gt;   ....&lt;br /&gt;&amp;lt;/overlay&amp;gt;&lt;br /&gt;&lt;br /&gt;The piece of code above explicitly told the browser that the toolbar with id 'tlbid' is a child node for the main window for firefox browser. I guess this helps the DOM manager to find the element required, effectively.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-989122857139907243?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/989122857139907243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=989122857139907243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/989122857139907243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/989122857139907243'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/master-doucment-handling-issues-on.html' title='Master document handling issues on different OSes'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8180553198662736440</id><published>2007-07-19T18:55:00.001-07:00</published><updated>2007-07-19T18:56:19.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><title type='text'>Call function after user is connected...success!</title><content type='html'>As mentioned in this &lt;a href="http://groups.google.com/group/xmpp4moz/t/2bc84bafdde12a39?hl=en"&gt;xmpp4moz thread&lt;/a&gt;, I was having problem on my PC, calling an alert() function after a user is connected. But the problem never occurred when tried on a Mac. Fortunately thanks to &lt;a href="http://hyperstruct.net/"&gt;Bard&lt;/a&gt;, who releases a new version of &lt;a href="http://sameplace.cc/download"&gt;xmpp4moz &lt;/a&gt;and &lt;a href="http://sameplace.cc/"&gt;SamePlace&lt;/a&gt; a couple of days earlier, this problems has been fixed. So everything is working in order now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8180553198662736440?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8180553198662736440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8180553198662736440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8180553198662736440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8180553198662736440'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/call-function-after-user-is.html' title='Call function after user is connected...success!'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-1164758773323743459</id><published>2007-07-19T18:34:00.001-07:00</published><updated>2007-07-19T18:55:58.236-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Newline / Line break inside layered divs</title><content type='html'>Imagine this codes:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;div id="layer1" style="position:absolute; width:....."&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;This is some text &amp;lt;BR&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;and this is a new line&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;you will be given the output of:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;This is some text&lt;/span&gt; &lt;span style="font-style: italic;"&gt; and this is a new line&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;simple right?&lt;br /&gt;&lt;br /&gt;But unfortunately, &amp;lt;BR&amp;gt; can't be use to append a line break or a new line in a sentence, dynamically, using innerHTML or textContent:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;script&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;document.getElementById('layer1').innerHTML = "This is some text &amp;lt;BR&amp;gt; and this is a new line"&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;div id="layer1" style="position:absolute; width:....."&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;no text yet&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;It will give you:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;This is some text&lt;/span&gt;&lt;span style="font-style: italic;"&gt; and this is a new line&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;So how to overcome this?&lt;br /&gt;&lt;br /&gt;Just use "\n" instead :D&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;script&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;document.getElementById('layer1').innerHTML = "This is some text \n and this is a new line"&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-1164758773323743459?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/1164758773323743459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=1164758773323743459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1164758773323743459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1164758773323743459'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/newline-line-break-inside-layered-divs.html' title='Newline / Line break inside layered divs'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2140377302832839437</id><published>2007-07-12T17:51:00.001-07:00</published><updated>2007-07-12T17:51:43.464-07:00</updated><title type='text'>Are You Indie?</title><content type='html'>&lt;p&gt;I wasn't able to dwelve further into TT develepment since last week till today, because I was assigned to put up a website for the IndieCade festival.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;IndieCade: The International Festival of Independent Games &lt;/i&gt; 		&lt;/p&gt;  &lt;p&gt;&lt;i&gt;IndieCade is the premiere annual festival for the future of independent games. The festival, planned for three undisclosed days in 2008, will feature continual screenings and hands-on play opportunities, game design jams, a play-testing atelier, large-scale social games, works-in-progress, workshops by creative industry legends, a gamemaking tools emporium, and a special mini-festival honoring the indie spirit in legacy games. Culminating in a gala award game show, IndieCade will be an unprecedented assembly of industry insiders, bellwether gamemakers, and players looking for the newest and most groundbreaking independent games.&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;- &lt;a href="http://areyouindie.com/"&gt;areyouindie.com&lt;/a&gt;&lt;/i&gt;&lt;br/&gt; &lt;/p&gt;  &lt;p&gt;They have a booth in E3, happening in LA right now, showcasing some of the participating game videos. We will have another promotional event in London after this. IndieCade will be held on an undisclosed date, in spring 2008. &lt;br/&gt; &lt;/p&gt;  &lt;p/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2140377302832839437?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2140377302832839437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2140377302832839437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2140377302832839437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2140377302832839437'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/are-you-indie.html' title='Are You Indie?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3465453673840433704</id><published>2007-07-03T06:18:00.001-07:00</published><updated>2007-07-03T06:19:27.244-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='reference'/><title type='text'>REF: Realtime Google Map sharing through XMPP messages</title><content type='html'>He's developing a realtime shared map that you can use to plan a travel with your friends in realtime while you chat with them.&lt;br /&gt;&lt;a href="http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/"&gt;http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/"&gt;http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3465453673840433704?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3465453673840433704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3465453673840433704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3465453673840433704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3465453673840433704'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/07/ref-realtime-google-map-sharing-through.html' title='REF: Realtime Google Map sharing through XMPP messages'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-1563542518588994346</id><published>2007-06-28T20:12:00.001-07:00</published><updated>2007-06-28T20:26:37.077-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>DEV: Solution accessing  element</title><content type='html'>I was having a problem accessing the &lt;i&gt;&amp;lt;toolbox&amp;gt;&lt;/i&gt;'s id due to the fact that I'm using &lt;i&gt;overlay&lt;/i&gt;. Here is my previous XML structure:&lt;br /&gt;&lt;i&gt;overlay&lt;br /&gt;---script&lt;br /&gt;---toolbox id="tbxid"&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;The important thing about &lt;i&gt;&amp;lt;overlay&amp;gt;&lt;/i&gt; is, all element inside the &lt;i&gt;&amp;lt;overlay&amp;gt;&lt;/i&gt; will be put 'over' the existing elements within the Firefox browser. So it checks for each element's id, in order to lay it over the correct elements. If it doesn't find any id from the &lt;i&gt;&amp;lt;overlay&amp;gt;&lt;/i&gt; element that match the element inside Firefox, it will drop that element and all its children. In our case, &lt;i&gt;id = "tbxid"&lt;/i&gt; is not define anywhere inside Firefox, so it got dropped.&lt;br /&gt;&lt;br /&gt;The solution to this is to give id to the child of the &lt;i&gt;&amp;lt;toolbox&amp;gt;&lt;/i&gt;, and not the &lt;i&gt;&amp;lt;toolbox&amp;gt;&lt;/i&gt; itself. So our XML structure will look like this:&lt;br /&gt;&lt;i&gt;overlay&lt;br /&gt;---script&lt;br /&gt;---toolbox&lt;br /&gt;------toolbar id="tlbid"&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;We then get the parent node of &amp;lt;toolbar&amp;gt; by:&lt;i&gt;&lt;br /&gt;var the_parent = document.getElementById('tlbid').parentNode;&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;And now we can do DOM manipulation using the parent:&lt;i&gt;&lt;br /&gt;alert(the_parent.nodeName); // =&amp;gt; alert 'toolbox'&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-1563542518588994346?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/1563542518588994346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=1563542518588994346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1563542518588994346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1563542518588994346'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/dev-solution-accessing-element.html' title='DEV: Solution accessing &lt;toolbox&gt; element'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-673687527448094929</id><published>2007-06-25T04:50:00.000-07:00</published><updated>2007-06-25T04:55:52.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Encapsulating XUL elements in  and  gave different result</title><content type='html'>I found an XUL code that enables us to put button and textbox on top of the statusbar. It uses &lt;toolbox&gt; that contains &lt;toolbarbutton&gt; and &lt;textbox&gt;. The sample codes are encapsulated in &lt;window&gt; much like any other XUL files. Since TT codes are using different approaches, that is we encapsulate elements inside &lt;overlay&gt;, and use it to lay over the default window, I changed the &lt;window&gt; tag to &lt;overlay&gt; to see what happen. It does gave a different output as shown in these two screenies:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;using &amp;lt;window&gt;- the chatbox is on top of statusbar&lt;window&gt;&lt;br /&gt;&lt;/window&gt;&lt;/span&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/textbox&gt;&lt;/toolbarbutton&gt;&lt;/toolbox&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img247.imageshack.us/img247/6171/ontopstatbar1ge2.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img247.imageshack.us/img247/6171/ontopstatbar1ge2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;toolbox&gt;&lt;toolbarbutton&gt;&lt;textbox&gt;&lt;window&gt;&lt;overlay&gt;&lt;window&gt;&lt;overlay&gt;&lt;span style="font-weight: bold;"&gt;&lt;window&gt;&lt;/window&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;using &lt;/span&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/textbox&gt;&lt;/toolbarbutton&gt;&lt;/toolbox&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;overlay&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img527.imageshack.us/img527/6968/ontopstatbar2lc3.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img527.imageshack.us/img527/6968/ontopstatbar2lc3.jpg" alt="" border="0" /&gt;&lt;/a&gt; - the Chatbox is on the right side&lt;toolbox&gt;&lt;toolbarbutton&gt;&lt;textbox&gt;&lt;window&gt;&lt;overlay&gt;&lt;window&gt;&lt;overlay&gt;&lt;span style="font-weight: bold;"&gt;&lt;overlay&gt;&lt;/overlay&gt;&lt;/span&gt;&lt;br /&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/overlay&gt;&lt;/window&gt;&lt;/textbox&gt;&lt;/toolbarbutton&gt;&lt;/toolbox&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-673687527448094929?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/673687527448094929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=673687527448094929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/673687527448094929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/673687527448094929'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/encapsulating-xul-elements-in-and-gave.html' title='Encapsulating XUL elements in &lt;window&gt; and &lt;overlay&gt; gave different result'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8244663644798890810</id><published>2007-06-25T04:48:00.001-07:00</published><updated>2007-06-25T04:56:40.965-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>How to add XUL elements on top of status bar?</title><content type='html'>&lt;p&gt;I've been searching around for ways to add XUL elements on top of the statusbar. On previous findings, only &amp;lt;label&amp;gt; can be put there. But today, I found another way to put XUL elements on top of the status bar. Here are some sample codes:&lt;br /&gt;&lt;i&gt;&amp;lt;toolbox align="end" insertbefore="status-bar"&amp;gt;&lt;br /&gt;      &amp;lt;toolbar id="nav-toolbar"&amp;gt;&lt;br /&gt;          &amp;lt;textbox id="urlfield"/&amp;gt;&lt;br /&gt;        &amp;lt;toolbarbutton label="Send"/&amp;gt;&lt;br /&gt;      &amp;lt;/toolbar&amp;gt;&lt;br /&gt;&amp;lt;/toolbox&amp;gt;&lt;/i&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8244663644798890810?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8244663644798890810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8244663644798890810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8244663644798890810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8244663644798890810'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/how-to-add-xul-elements-on-top-of.html' title='How to add XUL elements on top of status bar?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2282975558261553577</id><published>2007-06-25T04:40:00.001-07:00</published><updated>2007-06-25T04:56:58.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><title type='text'>What is 'preferences'?</title><content type='html'>&lt;p&gt;I found out '&lt;i&gt;preference&lt;/i&gt;' when I was trying to understand how &lt;i&gt;XMPP.enableContentDocument()&lt;/i&gt; works. Somehow, SPS uses preferences to get the XUL content panel element to be passed to the function mentioned, as 1 of its parameter.&lt;br /&gt;&lt;br /&gt;So, preferences may be, but not restricted to:&lt;br /&gt;- a way to store values universally (cross-pages?)&lt;br /&gt;- &lt;a href="http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code#Storing_shared_data_in_preferences"&gt;Storing shared data in preferences&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2282975558261553577?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2282975558261553577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2282975558261553577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2282975558261553577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2282975558261553577'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/what-is.html' title='What is &amp;#39;preferences&amp;#39;?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4741054517831349669</id><published>2007-06-25T04:39:00.001-07:00</published><updated>2007-06-25T04:57:19.552-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>DEV: Enable &amp;quot;xmpp session" on TT</title><content type='html'>I've created a demo that appends dynamic XHTML element, onto the current loaded page, following the SPS hierarchy. I've tested it on google.com, so here's how the hierarchy looks like:&lt;br /&gt;&lt;i&gt;#document&lt;br /&gt;   ---HTML&lt;br /&gt;      ---HEAD&lt;br /&gt;      ---BODY&lt;br /&gt;      ---DIV    id=xmpp-incoming&lt;br /&gt;      ---DIV    id=xmpp-outgoing&lt;br /&gt;      ---script &lt;/i&gt;&lt;br /&gt;Upon testing, I connect to another user through SPS. I send a message using the dinamically added chatbox and append the message to xmpp-outgoing. The message is appended successfully, but there is no message being sent to the other user. Then I activate the "xmpp session" by:&lt;br /&gt;    - clicking the user's name in my roster.&lt;br /&gt;    - Connect &amp;gt; Current Page&lt;br /&gt;After that, I tried sending message again using the chatbox, and the message was sent successfully to the other user. The other user viewed the message in their SPS sidebar.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Theory:&lt;/strong&gt;&lt;br /&gt;by doing Connect &amp;gt; Current Page (C&amp;gt;CP), I initiated an xmpp session between me and the other user. According to SPS codes, C&amp;gt;CP invokes a function called XMPP.enableContentDocument(...). This function takes the following argument:&lt;br /&gt;&lt;i&gt;panel        &lt;/i&gt;- a XUL content panel element (browser or iframe)&lt;br /&gt;&lt;i&gt;account     &lt;/i&gt;- the account you're connecting from&lt;br /&gt;&lt;i&gt;address     &lt;/i&gt;- the address of the contact you'll interact with inside the panel&lt;br /&gt;&lt;i&gt;type         &lt;/i&gt;- 'chat' or 'groupchat' - if a message leaves the page without&lt;br /&gt;    type, it will get the type specified by this argument&lt;br /&gt;&lt;i&gt;createSocket &lt;/i&gt;- boolean - create the two div's in the page if they're&lt;br /&gt;    not already there&lt;br /&gt;Thanks to Bard for his explanation of the parameters in this &lt;a href="http://groups.google.com/group/xmpp4moz/browse_thread/thread/c54ed7f92d2143b9"&gt;thread&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I will try to use this function in my codes, to enable xmpp session by itself.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Effort:&lt;/strong&gt;&lt;br /&gt;- add XMPP.enableContentDocument(...) to current codes.&lt;br /&gt;- statically set XMPP.enableContentDocument(...) params to:&lt;br /&gt;    - panel = (still unknown, due to Firefox security restriction)&lt;br /&gt;    - account = user1@gmail.com&lt;br /&gt;    - address = user2@gmail.com&lt;br /&gt;    - type = 'chat'&lt;br /&gt;    - createSocket = false&lt;br /&gt;- got these error message:&lt;br /&gt;    XMPP not define;&lt;br /&gt;    Solution: added script src &lt;i&gt;"chrome://xmpp4moz/content/xmpp.js"&lt;/i&gt;&lt;br /&gt;- then got this error:&lt;br /&gt;    Error: &lt;i&gt;uncaught exception: Permission denied to get property UnnamedClass.classes&lt;/i&gt;&lt;br /&gt;    - and message is still not send.&lt;br /&gt;- theory: maybe the value for panel is not correct. Tried all of these:&lt;br /&gt;&lt;i&gt;    - doc&lt;br /&gt;    - root&lt;br /&gt;    - bodyRoot&lt;br /&gt;    - windowRoot&lt;br /&gt;    - browser&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4741054517831349669?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4741054517831349669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4741054517831349669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4741054517831349669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4741054517831349669'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/dev-enable-session-on-tt.html' title='DEV: Enable &amp;amp;quot;xmpp session&amp;quot; on TT'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5843650319523068180</id><published>2007-06-21T04:40:00.001-07:00</published><updated>2007-06-21T04:43:04.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Share Cursor codeflow</title><content type='html'>I've got a chance to visit &lt;i&gt;Share Cursor&lt;/i&gt; codes again today. I was having problem accessing functions from a &lt;i&gt;dynamically added script&lt;/i&gt;. Some people says it couldn't be done directly, so I scoured around and found a workaround for it, as shown in previous post. Accessing anything isn't a problem anymore.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here's the flow:&lt;/strong&gt;&lt;br /&gt;- user click &lt;i&gt;Connect &amp;gt; Virtual workspace &amp;gt; Share Cursor&lt;/i&gt; ... the extension added &lt;i&gt;&amp;lt;script src="laser.js"&amp;gt;&lt;/i&gt;&lt;br /&gt;- &lt;i&gt;laser.js&lt;/i&gt; initialized everything from drawing the cursor, to creating 2 xmpp divs and all required elements.&lt;br /&gt;- therefore, there is &lt;i&gt;no problem&lt;/i&gt; to access anything as everything is generated from the same document and .js file.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5843650319523068180?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5843650319523068180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5843650319523068180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5843650319523068180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5843650319523068180'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/share-cursor-codeflow.html' title='Share Cursor codeflow'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5122840733157855055</id><published>2007-06-21T04:39:00.001-07:00</published><updated>2007-06-24T17:27:05.074-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Accessing chrome level function from browser's document</title><content type='html'>For security reasons, Firefox doesn't allow HTML element's inside a document's body to access functions / vars from chrome path files directly. Therefore, we need to append &lt;i&gt;&amp;lt;script&amp;gt;&lt;/i&gt; tag at the appropriate places.&lt;br /&gt;  - inside &lt;i&gt;&amp;lt;body&amp;gt;&lt;/i&gt; ==&amp;gt; didn't work&lt;br /&gt;  - inside &lt;i&gt;&amp;lt;head&amp;gt;&lt;/i&gt; ==&amp;gt; didn't work&lt;br /&gt;  - inside &lt;i&gt;&amp;lt;html&amp;gt;&lt;/i&gt; and same level as &lt;i&gt;&amp;lt;head&amp;gt;&lt;/i&gt; and &lt;i&gt;&amp;lt;body&amp;gt;&lt;/i&gt; ==&amp;gt; &lt;strong&gt;SUCCESS!&lt;/strong&gt;&lt;br /&gt;  &lt;i&gt;root.childNodes[0].appendChild(oScript);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Reminder:&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;  windowRoot = document.documentElement;&lt;br /&gt;  bodyRoot = content.document.body;&lt;br /&gt;  root = content.document;&lt;br /&gt;  doc = window.document;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;-------------------------------------------------&lt;br /&gt;When in CHROME level&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;-------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;   alert(windowRoot.nodeName); //window&lt;br /&gt;  alert(bodyRoot.nodeName); //body&lt;br /&gt;  alert(root.nodeName); //#document&lt;br /&gt;  alert(doc.nodeName); //#document&lt;br /&gt;&lt;br /&gt;  alert(root.childNodes[0].nodeName); //HTML&lt;br /&gt;  alert(doc.childNodes[0].nodeName); //window&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;-------------------------------------------------&lt;br /&gt;When in document level&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;-------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(windowRoot.nodeName); //HTML&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(bodyRoot.nodeName); //body&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(root.nodeName); //#document&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(doc.nodeName); //#document&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(root.childNodes[0].nodeName); //HTML&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;alert(doc.childNodes[0].nodeName); //HTML&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5122840733157855055?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5122840733157855055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5122840733157855055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5122840733157855055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5122840733157855055'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/accessing-chrome-level-function-from.html' title='Accessing chrome level function from browser&amp;#39;s document'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5898403914766810402</id><published>2007-06-21T04:37:00.001-07:00</published><updated>2007-06-21T04:42:01.198-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Best Javascript Practises</title><content type='html'>&lt;p&gt;During my research, I came across a &lt;a href="http://www.javascripttoolbox.com/bestpractices/"&gt;website &lt;/a&gt;that teaches a few best &lt;span&gt;practices&lt;/span&gt; for &lt;span&gt;Javascript&lt;/span&gt; programmers.&lt;/p&gt;    &lt;i&gt;Here are some of them:&lt;/i&gt;&lt;br /&gt;&lt;p&gt;- only &lt;i&gt;&lt;span&gt;javascript&lt;/span&gt; 1.7&lt;/i&gt; have block scope. Hence its a very good idea to put this code in the script definition:&lt;br /&gt;&amp;lt;script type="text/&lt;span&gt;javascript&lt;/span&gt;" version="1.7"&amp;gt;&lt;br /&gt;- define variables with 'var', to differentiate variable's scope&lt;br /&gt;&lt;strong&gt;global var:&lt;/strong&gt;&lt;br /&gt;&lt;i&gt;var x; //global&lt;br /&gt;x =0;&lt;br /&gt;function &lt;span&gt;init&lt;/span&gt;()&lt;br /&gt;{&lt;br /&gt;    var x = 5;&lt;br /&gt;    alert(x); // shows 5&lt;br /&gt;}&lt;br /&gt;alert(x); // shows 0&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5898403914766810402?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5898403914766810402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5898403914766810402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5898403914766810402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5898403914766810402'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/best-javascript-practises.html' title='Best Javascript Practises'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2877188163167497833</id><published>2007-06-20T02:43:00.001-07:00</published><updated>2007-06-20T02:44:11.008-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>Dev: using setTimeout() to delay execution until .js file is successfully loaded</title><content type='html'>&lt;p&gt;This is done only using html and js file, no XUL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#1 Launch addButton() and addScript() at the same execution point:&lt;/strong&gt;&lt;br /&gt;    -  &lt;i&gt;&amp;lt;a href="#" onclick="addButton();addScript('chrome://truetalk/content/data.js');"&amp;gt;START&amp;lt;/a&amp;gt;&lt;/i&gt;&lt;br /&gt;    - expected alert message is displayed.&lt;br /&gt;    - success, except in flock : Error: &lt;i&gt;remoteValue is not defined&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;strong&gt;#2 Execute addScript() first, then addButton()&lt;/strong&gt;&lt;br /&gt;    - addScript() -&amp;gt; addButton() -&amp;gt; click button -&amp;gt; alert messages&lt;br /&gt;    - &lt;i&gt;&amp;lt;a href="#" onclick="addScript('chrome://truetalk/content/data.js');"&amp;gt;START&amp;lt;/a&amp;gt;&lt;/i&gt;&lt;br /&gt;    - expected alert message is displayed.&lt;br /&gt;    - success, except in flock: Error: &lt;i&gt;remoteValue is not defined&lt;/i&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;#3 Append #2 by adding a new function [sendMessage()] in data.js, try to call it on button click&lt;/strong&gt;&lt;br /&gt;    - &lt;i&gt;oButton.setAttribute("onclick", "sendMessage();");&lt;/i&gt;&lt;br /&gt;    - success, except in flock: Error: &lt;i&gt;remoteValue is not defined.&lt;/i&gt;&lt;!-- technorati tags begin --&gt;&lt;/p&gt;&lt;p style="font-size: 10px; text-align: right;"&gt;&lt;br /&gt;&lt;a href="http://technorati.com/tag/development" rel="tag"&gt;&lt;/a&gt;&lt;/p&gt;&lt;!-- technorati tags end --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2877188163167497833?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2877188163167497833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2877188163167497833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2877188163167497833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2877188163167497833'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/dev-using-settimeout-to-delay-execution_20.html' title='Dev: using setTimeout() to delay execution until .js file is successfully loaded'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-1104845512455122744</id><published>2007-06-17T17:05:00.001-07:00</published><updated>2007-06-17T17:07:53.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><title type='text'>Back in selangor</title><content type='html'>I'm back in Selangor for this week onwards. So I'll be in the office. Will update Dr. Yunuz about this.&lt;br /&gt;&lt;p&gt;&lt;!-- technorati tags begin --&gt;&lt;/p&gt;&lt;!-- technorati tags end --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-1104845512455122744?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/1104845512455122744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=1104845512455122744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1104845512455122744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1104845512455122744'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/back-in-selangor.html' title='Back in selangor'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2804441524702338070</id><published>2007-06-14T03:42:00.000-07:00</published><updated>2007-06-14T03:46:21.072-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='dom mutation'/><title type='text'>How to add HTML dom elements dynamically inside a loaded page?</title><content type='html'>- solution:&lt;br /&gt;   - get the content of the loaded document in a tabbedbrowser&lt;br /&gt;   - alert(content.document); &amp; alert(gBrowser.selectedBrowser.contentDocument); =&gt;&lt;br /&gt;        &lt;span style="font-style: italic;"&gt;[ Object XPCNativeWrapper [ object HTMLDocument ] ]&lt;/span&gt;&lt;br /&gt;   - rootBody = content.document.body; =&gt;  &amp;lt;body&gt; tag!&lt;br /&gt;   - then we can simply add a &amp;lt;div&gt; tag by:&lt;br /&gt;       var tmpDiv = document.createElement('div');&lt;br /&gt;       rootBody.appendChild(tmpDiv);&lt;br /&gt;&lt;br /&gt;   - ref:  &lt;br /&gt;http://forums.mozillazine.org/viewtopic.php?t=522447&amp;amp;sid=47babc2b5e758ba21458bb73d733&lt;br /&gt;http://developer.mozilla.org/en/docs/Extension_Code_Snippets:Tabbed_Browser#Getting_document_of_currently_selected_tab&lt;br /&gt;http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code#Content_windows&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2804441524702338070?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2804441524702338070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2804441524702338070' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2804441524702338070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2804441524702338070'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/how-to-add-html-dom-elements.html' title='How to add HTML dom elements dynamically inside a loaded page?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5021837498835024674</id><published>2007-06-13T07:04:00.000-07:00</published><updated>2007-06-13T07:14:54.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><title type='text'>DEV: client-side demo app (No-GUI)</title><content type='html'>- connect ... DONE.&lt;br /&gt;- Send Message&lt;br /&gt;   - add 3 more popup menu item:&lt;br /&gt;       - to login...SUCCESS&lt;br /&gt;       - to send message...SUCCESS&lt;br /&gt;       - to logout...SUCCESS&lt;br /&gt;- Receive message:&lt;br /&gt;   - catch using channel.on() function...SUCCESS&lt;br /&gt;- Display messages&lt;br /&gt;   - display in alert box, since no GUI&lt;br /&gt;- ref @ &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocLocalApplicationDevelopment"&gt;http://dev.hyperstruct.net/xmpp4moz/wiki/DocLocalApplicationDevelopment&lt;/a&gt;&lt;br /&gt;- unfortunately, since I don't have any GUI, my username and password must be hardcoded to connect and send message. Therefore, I can't enclose a demo for this post.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How-to run:&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img365.imageshack.us/img365/4637/demoextensionlh5.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img365.imageshack.us/img365/4637/demoextensionlh5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;0)&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;Install extension!&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;!) Restart/Launch Firefox&lt;br /&gt;2) Right-click anywhere on the page&lt;br /&gt;3) Goto TrueTalk &gt; Login / Send Message / Logout&lt;br /&gt;3.1) Login - login to gmail with hardcoded username and password.&lt;br /&gt;3.2) Send Message - send a fixed message to a fixed receiver.&lt;br /&gt;3.3) Logout - Logout from gmail.&lt;br /&gt;4) Received messages (not fixed) will be displayed in alert box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5021837498835024674?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5021837498835024674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5021837498835024674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5021837498835024674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5021837498835024674'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/dev-client-side-demo-app-no-gui.html' title='DEV: client-side demo app (No-GUI)'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3296201926616075848</id><published>2007-06-13T06:59:00.000-07:00</published><updated>2007-06-13T07:04:19.193-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><title type='text'>Dev: [div] tags app (demo)</title><content type='html'>- I will call the demo app with this new name.&lt;br /&gt;- It's because I use 2 divs tag to catch incoming and outgoing message.&lt;br /&gt;- The user who wants to use this, must also have xmpp4moz and SPS installed.&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Error&lt;/span&gt;: Blank message appeared after a REAL message in SPS sidebar.&lt;br /&gt;- ex:&lt;br /&gt;    sender1 : Hi there, Im using &lt;span style="font-weight: bold;"&gt;Firefox&lt;/span&gt;&lt;br /&gt;    sender1 :&lt;br /&gt;    sender2 : Hi, Im using &lt;span style="font-weight: bold;"&gt;Flock&lt;/span&gt;&lt;br /&gt;    sender2 :&lt;br /&gt;- Cause:&lt;br /&gt;    - In Flock browser, it might be a bug, because their codebase is on top of Firefox 1.5 framework.&lt;br /&gt;    - In Firefox, It post 2 messages because of this piece of code:&lt;br /&gt;    if(event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_ENTER)&lt;br /&gt;        sendMessage();&lt;br /&gt;- Solution:&lt;br /&gt;    - change it to:&lt;br /&gt;    if(event.keyCode == event.DOM_VK_ENTER)&lt;br /&gt;        sendMessage();&lt;br /&gt;- here is the downloadable &lt;a href="http://hazrat.notathing.net/products/x4m/x4mtry20070608-2130.rar"&gt;demo&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3296201926616075848?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3296201926616075848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3296201926616075848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3296201926616075848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3296201926616075848'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/dev-div-tags-app-demo.html' title='Dev: [div] tags app (demo)'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6698714253636392708</id><published>2007-06-12T18:22:00.000-07:00</published><updated>2007-06-12T18:24:39.333-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='extension'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Error console to help debugging process</title><content type='html'>- Firefox has a great built-in tool to help extension developers debug their codes, called the &lt;span style="font-weight: bold;"&gt;Error Console.&lt;/span&gt;&lt;br /&gt;- I happened to stumble upon a problem with &lt;a href="http://dev.hyperstruct.net/xmpp4moz/"&gt;xmpp4moz&lt;/a&gt;, and &lt;a href="http://hyperstruct.net/"&gt;Bard &lt;/a&gt;adviced me on enabling the &lt;span style="font-weight: bold;"&gt;Error Console&lt;/span&gt;.&lt;br /&gt;- For more details, you can check out &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/Report"&gt;http://dev.hyperstruct.net/xmpp4moz/wiki/Report&lt;/a&gt;. Look up on how to enable chrome errors display in the console.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6698714253636392708?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6698714253636392708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6698714253636392708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6698714253636392708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6698714253636392708'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/error-console-to-help-debugging-process.html' title='Error console to help debugging process'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-6559467193845466937</id><published>2007-06-12T18:03:00.000-07:00</published><updated>2007-06-12T18:07:15.622-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='caution'/><title type='text'>Warning: plain-text password in about config, filter xmpp (FireFox only)</title><content type='html'>This only happens if you have &lt;span style="font-weight: bold;"&gt;xmpp4moz&lt;/span&gt;, and save your jabber a/c password &lt;span style="font-weight: bold;"&gt;in it's Account Manager.&lt;/span&gt;&lt;br /&gt;- Launch &lt;span style="font-weight: bold;"&gt;Firefox&lt;/span&gt;&lt;br /&gt;- type '&lt;span style="font-weight: bold;"&gt;about config&lt;/span&gt;' (without quotes) in address bar&lt;br /&gt;- type '&lt;span style="font-weight: bold;"&gt;xmpp&lt;/span&gt;' (without quotes) in filter bar&lt;br /&gt;- look for '&lt;span style="font-weight: bold;"&gt;xmpp.account.&lt;span style="font-style: italic;"&gt;1180919090843&lt;/span&gt;.password&lt;/span&gt;' (the numbers may be &lt;span style="font-weight: bold;"&gt;different&lt;/span&gt;). Your password is in the next column.&lt;br /&gt;- just a friendly reminder from your friendly neighbourhood... programmer :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-6559467193845466937?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/6559467193845466937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=6559467193845466937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6559467193845466937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/6559467193845466937'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/warning-plain-text-password-in-about.html' title='Warning: plain-text password in about config, filter xmpp (FireFox only)'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-1288473803392061024</id><published>2007-06-12T06:42:00.000-07:00</published><updated>2007-06-12T06:45:20.105-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='extension'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Setting up for FFox extension development</title><content type='html'>- create a project folder , somewhere, ex: &lt;span style="font-weight: bold;"&gt;C:\myext\ &lt;/span&gt;. This will be our &lt;span style="font-weight: bold;"&gt;root&lt;/span&gt;.&lt;br /&gt;    - inside it, we create another folder call &lt;span style="font-weight: bold;"&gt;chrome&lt;/span&gt;&lt;br /&gt;    - inside &lt;span style="font-style: italic;"&gt;chrome&lt;/span&gt;, we create another folder called &lt;span style="font-weight: bold;"&gt;content&lt;/span&gt;, this is where we keep our &lt;span style="font-weight: bold;"&gt;.xul and .js files &lt;/span&gt;&lt;br /&gt;    - Now go back to &lt;span style="font-style: italic;"&gt;root, &lt;/span&gt;create 2 text files, &lt;span style="font-weight: bold;"&gt;install.rdf&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;chrome.manifest&lt;/span&gt;&lt;br /&gt;    - for stuff to put inside &lt;span style="font-style: italic;"&gt;install.rdf&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;chrome.manifest&lt;/span&gt; , and more details, you can check out &lt;a href="http://developer.mozilla.org/en/docs/Building_an_Extension"&gt;FF extension tutorial @ MDC&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- for development purposes, we don't need to create a .xpi package.&lt;br /&gt;- to test whether our extension can be used or not, do this:&lt;br /&gt;    - go into your Firefox Profile's extension folder ex: &lt;span style="font-weight: bold;"&gt;C:\Documents and Settings\USER\Application Data\Mozilla\Firefox\Profiles\USER_PROFILE.default\extensions\&lt;/span&gt;&lt;br /&gt;    - create a text file, with your &lt;span style="font-weight: bold;"&gt;app id&lt;/span&gt; (the one you put in &lt;em:id&gt; tag inside install.rdf) as its name. Just put the id, &lt;span style="font-weight: bold;"&gt;no .TXT or any other extension required.&lt;/span&gt;&lt;br /&gt;    - open the text file, put the &lt;span style="font-weight: bold;"&gt;path &lt;/span&gt;of your extension root folder, ex: C:\myext\ , don't forget the following '\'&lt;br /&gt;    - start Firefox and your app should run :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-1288473803392061024?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/1288473803392061024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=1288473803392061024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1288473803392061024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/1288473803392061024'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/setting-up-for-ffox-extension.html' title='Setting up for FFox extension development'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5356571932210858840</id><published>2007-06-12T04:27:00.000-07:00</published><updated>2007-06-12T04:28:53.416-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>How to use xmpp4moz server-side applications</title><content type='html'>At least xmpp4moz and SamePlace need to be installed and working to use server-side applications.&lt;br /&gt;&lt;br /&gt;== Generic way ==&lt;br /&gt;&lt;br /&gt; - Connect your Jabber account.&lt;br /&gt; - Open a conversation with one of your contacts in !SamePlace.&lt;br /&gt; - In the browser, navigate to a server-side application (e.g. http://apps.sameplace.cc/notes/notes.xhtml).&lt;br /&gt; - Click on the `connect` [[Image(connect.png)]] icon in the upper right of the conversation panel.&lt;br /&gt; - Start using the application.&lt;br /&gt;&lt;br /&gt;The same steps need to be followed by your contact.&lt;br /&gt;&lt;br /&gt;== Quicker way ==&lt;br /&gt;&lt;br /&gt; - In the browser, navigate to a server-side application (e.g. http://apps.sameplace.cc/notes/notes.xhtml).&lt;br /&gt; - Bookmark it inside the `SamePlace` folder.&lt;br /&gt; - In the contact list, right-click on your contact, then select '''Communicate in browser using... -&gt; &lt;name&gt;'''&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;taken from &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocUsingRemoteApplications?format=txt"&gt;http://dev.hyperstruct.net/xmpp4moz/wiki/DocUsingRemoteApplications?format=txt&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5356571932210858840?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5356571932210858840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5356571932210858840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5356571932210858840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5356571932210858840'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/how-to-use-xmpp4moz-server-side.html' title='How to use xmpp4moz server-side applications'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8504366253966611228</id><published>2007-06-12T03:50:00.000-07:00</published><updated>2007-06-12T04:26:17.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='e4x'/><category scheme='http://www.blogger.com/atom/ns#' term='stanza'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>SPS Chat events' stanzas</title><content type='html'>&lt;span style="font-style: italic;"&gt;if textbox is empty, then on 1st keypress:&lt;/span&gt;&lt;br /&gt;&amp;lt;message to="foo@gmail.com" type="chat"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing /&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;composing xmlns="http://jabber.org/protocol/chatstates" /&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;- if on first keypress, we are trying to erase/delete a letter:&lt;/span&gt;&lt;br /&gt;&amp;lt;message to="foo@gmail.com" type="chat"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event" /&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates" /&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;- if receiving a message:&lt;/span&gt;&lt;br /&gt;&amp;lt;message to="foo@gmail.com" type="chat"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing /&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates" /&gt;&lt;br /&gt;&amp;lt;body&gt;foo is not bar&lt;br /&gt;&amp;lt;html xmlns="http://jabber.org/protocol/xhtml-im" /&gt;&lt;br /&gt;&amp;lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;foo is not bar&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Here are some ways to parse the values (according to E4X specification):&lt;/span&gt;&lt;br /&gt;============================================================&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza &lt;/span&gt;= &amp;lt;message to="foo@gmail.com" type="chat"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing /&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates" /&gt;&lt;br /&gt;&amp;lt;body&gt;foo is not bar&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;html xmlns="http://jabber.org/protocol/xhtml-im" /&gt;&lt;br /&gt;&amp;lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;foo is not bar&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.body&lt;/span&gt; = "foo is not bar"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.@to&lt;/span&gt; = "foo@gmail.com"&lt;br /&gt;&lt;br /&gt;but, to get the namespace (xmlns) values, its a little bit &lt;span style="font-weight: bold;"&gt;different&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;var ns = 'jabber:x:event'; &lt;span style="font-style: italic;"&gt;//declare a var to hold the required namespace&lt;/span&gt;&lt;br /&gt;if(stanza.ns::x != undefined) {&lt;br /&gt;&lt;span style="font-style: italic;"&gt;// ok, there is an &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;x xmlns="jabber:x:event" /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;x xmlns="jabber:x:event"&gt;, go ahead... &lt;/x&gt;&lt;/span&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;span style="font-style: italic;"&gt;// no &lt;x xmlns="jabber:x:event"&gt; &lt;/x&gt;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;alert(stanza.ns::x.namespace());  &lt;span style="font-style: italic;"&gt;//display the namespace in an alert box&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;so for getting the xmlns value, the general term would be:&lt;/span&gt;&lt;br /&gt;stanza.&lt;span style="font-weight: bold;"&gt;[NAMESPACE_VAR]&lt;/span&gt;::&lt;span style="font-weight: bold;"&gt;[TAG_NAME]&lt;/span&gt;.namespace();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Thanks to &lt;a href="http://hyperstruct.net/"&gt;Bard&lt;/a&gt; for the help on these codes. Original source is can be found in the &lt;a href="http://groups.google.com/group/xmpp4moz/browse_thread/thread/f637c2823891b5a0"&gt;forum&lt;/a&gt;. If I found a reliable E4X documentation, I'll post it here.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8504366253966611228?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8504366253966611228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8504366253966611228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8504366253966611228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8504366253966611228'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/sps-chat-events-stanzas.html' title='SPS Chat events&apos; stanzas'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3057361206518926267</id><published>2007-06-11T08:47:00.000-07:00</published><updated>2007-06-11T08:55:39.910-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Creating my x4m client-side app</title><content type='html'>- get codes from &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocLocalApplicationDevelopment#Fullexampleofclient-sideapplication"&gt;here&lt;/a&gt;&lt;br /&gt;- message will be send only when I'm connected to a server through SPS.&lt;br /&gt;- mesage is displayed on the sidebar only, can't be displayed in the 'conversation' box on the right.&lt;br /&gt;- there are no xmpp4moz divs, because it catches incoming message by using channel.on() function.&lt;br /&gt;- app is connected to the xmpp4moz library through this code =&gt;&lt;br /&gt;&amp;lt;script type="application/x-javascript" src="chrome://xmpp4moz/content/xmpp.js"/&gt;&lt;span style="font-style: italic;"&gt;&lt;script type="application/x-javascript" src="chrome://xmpp4moz/content/xmpp.js"&gt;&lt;/script&gt;&lt;/span&gt;&lt;br /&gt;- posted this problem in &lt;a href="http://groups.google.com/group/xmpp4moz"&gt;forum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Types of of apps related to Firefox&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;- Server-side :&lt;/span&gt;&lt;br /&gt; - usually in .xhtml format, so it can be understood by most current browsers&lt;br /&gt; - resides on the server&lt;br /&gt;&lt;span style="font-style: italic;"&gt;- Client-side : &lt;/span&gt;&lt;br /&gt; - usually in .xul format&lt;br /&gt; - understood by Firefox only&lt;br /&gt; - installed as extension within Firefox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3057361206518926267?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3057361206518926267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3057361206518926267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3057361206518926267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3057361206518926267'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/creating-my-x4m-client-side-app.html' title='Creating my x4m client-side app'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5308508720407901801</id><published>2007-06-08T06:37:00.000-07:00</published><updated>2007-06-08T06:43:12.034-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='example'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>XUL-related links</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Just a collection of links I've found today:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    - &lt;a href="http://starkravingfinkle.org/blog/2007/02/more-xul-dark-matter/"&gt;XUL Success Stories&lt;/a&gt;&lt;br /&gt;    - &lt;a href="http://starkravingfinkle.org/blog/2007/01/the-more-you-know/"&gt;Firefox extension developers guides&lt;/a&gt;&lt;br /&gt;    - &lt;a href="http://xulplanet.com/testcases/example-viewer.xul"&gt;XUL test cases with codes and examples&lt;/a&gt;&lt;br /&gt;    - &lt;a href="http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code"&gt;Working with windows in chrome code&lt;/a&gt;&lt;br /&gt;    - &lt;a href="http://spket.com/"&gt;Spket IDE&lt;/a&gt;: Nice XUL IDE, interface like Eclipse, can also be installed as Eclipse plug-in. But still no viewer like dreamweaver&lt;br /&gt;    - &lt;a href="http://demo.webdevelopers.cz/cms-xul-demo"&gt;Content Management System (CMS) - created using XUL/AJAX&lt;/a&gt;&lt;br /&gt;    - &lt;a href="http://www.w3schools.com/dom/dom_node.asp"&gt;XML DOM - node object properties reference&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5308508720407901801?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5308508720407901801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5308508720407901801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5308508720407901801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5308508720407901801'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/xul-related-links.html' title='XUL-related links'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-324289127096945589</id><published>2007-06-08T05:51:00.000-07:00</published><updated>2007-06-10T19:32:33.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='e4x'/><category scheme='http://www.blogger.com/atom/ns#' term='stanza'/><category scheme='http://www.blogger.com/atom/ns#' term='schema'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><title type='text'>How SPS's sidebar can display same message as http://apps.sameplace.cc/chat/chat.xhtml?</title><content type='html'>Try to log in with a friend, then activate SPS's chat app through Connect &gt; Misc &gt; Chat (new page). You can chat on the sidebar and it will display the same message also in the right panel, and vice-versa. How does this work?&lt;br /&gt;- It's because of the SCHEMA.&lt;br /&gt;- once you follow SPS's schema, its no problem :D&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- SPS's xmpp schemas:&lt;/span&gt;&lt;br /&gt;- &lt;span style="font-style: italic;"&gt;sender sends message, and get this:&lt;/span&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&amp;lt;message to="me@gmail.com/Browser" type="chat" id="1024"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing/&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates"/&gt;&lt;br /&gt;&amp;lt;body&gt;mesend this in SPS &amp;lt;/body&gt;&lt;br /&gt;&amp;lt;html xmlns="http://jabber.org/protocol/xhtml-im"&gt;&lt;br /&gt;&amp;lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;mesend this in SPS&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-style: italic;"&gt;receiver receives message, and get this:&lt;/span&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&amp;lt;message to="me@gmail.com/Browser" type="chat" id="1024" from="u@gmail.com/SamePlace"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing/&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates"/&gt;&lt;br /&gt;&amp;lt;body&gt;u send this in SPS &amp;lt;/body&gt;&lt;br /&gt;&amp;lt;html xmlns="http://jabber.org/protocol/xhtml-im"&gt;&lt;br /&gt;&amp;lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;u send this in SPS&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&amp;lt;nos:x xmlns:nos="google:nosave" value="disabled"/&gt;&lt;br /&gt;&amp;lt;arc:record xmlns:arc="http://jabber.org/protocol/archive" otr="false"/&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-style: italic;"&gt;Schema manipulating:&lt;/span&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza &lt;/span&gt;= &amp;lt;message to="me@gmail.com/Browser" type="chat" id="1024" from="u@gmail.com/SamePlace"&gt;&lt;br /&gt;&amp;lt;x xmlns="jabber:x:event"&gt;&lt;br /&gt;&amp;lt;composing/&gt;&lt;br /&gt;&amp;lt;/x&gt;&lt;br /&gt;&amp;lt;active xmlns="http://jabber.org/protocol/chatstates"/&gt;&lt;br /&gt;&amp;lt;body&gt;u send this in SPS &amp;lt;/body&gt;&lt;br /&gt;&amp;lt;html xmlns="http://jabber.org/protocol/xhtml-im"&gt;&lt;br /&gt;&amp;lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;u send this in SPS&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&amp;lt;nos:x xmlns:nos="google:nosave" value="disabled"/&gt;&lt;br /&gt;&amp;lt;arc:record xmlns:arc="http://jabber.org/protocol/archive" otr="false"/&gt;&lt;br /&gt;&amp;lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.@to&lt;/span&gt; = me@gmail.com/Browser&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;stanza.@from = &lt;/span&gt;u@gmail.com/SamePlace&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.body&lt;/span&gt; = u send this in SPS&lt;br /&gt;&lt;br /&gt;Some trials/errors when trying to get xmlns value:&lt;br /&gt;errors (displayed on alert() boxes);&lt;br /&gt;======================================================================&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.x.namespace()  &lt;/span&gt;           = cannot call namespace method on an XML list with 0 elements        (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.x.namespace&lt;/span&gt;            = blank                                     (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.composing.namespace()&lt;/span&gt;     = cannot call namespace method on an XML list with 0 elements        (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.composing.namespace&lt;/span&gt;     = blank                                    (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.x[0].namespace() &lt;/span&gt;        = stanza.x[0] has no properties                         (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.x[0].namespace  &lt;/span&gt;       = stanza.x[0] has no properties                          (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ToString(stanza.x)    &lt;/span&gt;         = ToString is not a function                        (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;toString(stanza.x) &lt;/span&gt;            = [object Window]                            (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;toString(stanza.x.namespace()) &lt;/span&gt;   = cannot call namespace method on an XML list with 0 elements         (in Firebug)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;toString(stanza.x.namespace)  &lt;/span&gt;   = [object Window]                            (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.namespace('x')&lt;/span&gt;            = "undefined"                                (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.namespace("x") &lt;/span&gt;       = "undefined"                                (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.namespace("composing") &lt;/span&gt;   = "undefined"                                (in Alert())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stanza.namespace() &lt;/span&gt;           = blank                                    (in Alert())&lt;br /&gt;&lt;br /&gt;The syntax are based on &lt;a href="http://www.w3schools.com/e4x/default.asp"&gt;E4X&lt;/a&gt; Spresification. Documentation are vague for now, but these are the 2 references that I think the most adequate.&lt;br /&gt;&lt;a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm"&gt;http://www.ecma-international.org/publications/standards/Ecma-357.htm &lt;/a&gt;&lt;br /&gt;&lt;a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/js/html/wwhelp.htm?href=13_Working_with_XML_169_01.html"&gt;http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/js/html/wwhelp.htm?href=13_Working_with_XML_169_01.html&lt;/a&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Stick to this schema. Owh and don't forget, you'll need 2 divs/container at all time. 1 with id="xmpp-incoming" and the other with id="xmpp-outgoing". Both are responsible to catch xmpp packet generated by xmpp4moz.&lt;br /&gt;&lt;br /&gt;Here's a &lt;span style="font-style: italic;"&gt;screeny &lt;/span&gt;to sum it up:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img294.imageshack.us/img294/5240/x4mspsintegrationxr5.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img294.imageshack.us/img294/5240/x4mspsintegrationxr5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://hazrat.notathing.net/products/x4m/x4mtry20070608-2130.rar"&gt;Demo app.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;solution&lt;/span&gt;: change codes to suit SPS's schema.&lt;br /&gt;- incoming : DONE.&lt;br /&gt;- outgoing : DONE.&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;ERROR&lt;/span&gt;: SPS send an event &lt;message&gt; on first keypress on SPS left panel. I can't seem to differentiate it from other messages.&lt;br /&gt;&lt;br /&gt;&lt;/message&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img507.imageshack.us/img507/6647/x4meventerrorng9.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img507.imageshack.us/img507/6647/x4meventerrorng9.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can't seem to differentiate this message with other REAL message, as result, blank messages may appear on chatroom. Posted this on the &lt;a href="http://groups.google.com/group/xmpp4moz"&gt;forum&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-324289127096945589?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/324289127096945589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=324289127096945589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/324289127096945589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/324289127096945589'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/how-spss-sidebar-can-display-same.html' title='How SPS&apos;s sidebar can display same message as http://apps.sameplace.cc/chat/chat.xhtml?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-5419099061920486832</id><published>2007-06-07T18:19:00.000-07:00</published><updated>2007-06-07T18:20:02.373-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><title type='text'>Change of workplace for 11-06-2007 till 15-06-2007</title><content type='html'>I'll be heading back to JB to prepare my things, before the semester starts. I need to change my workplace, but it will not interfere with my work schedule. Here is the flow:&lt;br /&gt;&lt;br /&gt;  - Going to JB on Sunday&lt;br /&gt;  - Monday till Friday working&lt;br /&gt;  - Saturday get back to Cyberjaya&lt;br /&gt;&lt;br /&gt;I'll inform Dr. Yunus about this matter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-5419099061920486832?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/5419099061920486832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=5419099061920486832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5419099061920486832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/5419099061920486832'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/change-of-workplace-for-11-06-2007-till_07.html' title='Change of workplace for 11-06-2007 till 15-06-2007'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-7395445374663658303</id><published>2007-06-07T03:13:00.000-07:00</published><updated>2007-06-07T13:40:10.778-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MPL'/><category scheme='http://www.blogger.com/atom/ns#' term='license'/><category scheme='http://www.blogger.com/atom/ns#' term='GPL'/><category scheme='http://www.blogger.com/atom/ns#' term='tri-license'/><title type='text'>MPL/LGPL/GPL tri-license</title><content type='html'>- These licences refers to 'modification' done on the licensed software's (SPS / x4m) codes.&lt;br /&gt;  -  &lt;a href="http://www.mozilla.org/MPL/mpl-faq.html"&gt;&lt;span style="font-weight: bold;"&gt;How 'viral' is the MPL? If I use MPLed code in my proprietary application, will I have to give all the source code away?&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="font-style: italic;"&gt;The MPL has a limited amount of 'copyleft' - more copyleft than the BSD family of licenses, which have no copyleft at all, but less than the LGPL or the GPL. It is based around the definition of a 'Modification' in the license [1.9].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        What is a Modification? Any changes to MPLed files, or new files into which MPLed code has been copied, are Modifications and so fall under the MPL. New files containing only your code are not Modifications, and not covered by the MPL.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        Files which fall under the MPL because they are or contain Modifications must be made available as detailed in the license (or elsewhere in this FAQ.) Other files may be kept proprietary.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        One well-known example of this is the Netscape-branded browser. It contains (and Netscape makes source code available for) many files from the Mozilla project, which are under the MPL. But it also contains proprietary code, for example to integrate with the AOL Instant Messenger service.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;    - In our case, we don't modified any of Mozilla/Firefox codes, as well as x4m or SPS codes. All our codes are in separate files, which will be launch using SPS/x4m. Therefor our code is proprietary.It is like the example mentioned above.&lt;br /&gt;&lt;br /&gt;  -  &lt;a href="http://www.gnu.org/licenses/gpl-faq.html"&gt;&lt;span style="font-weight: bold;"&gt;Does the GPL require that source code of modified versions be posted to the public?&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;      &lt;span style="font-style: italic;"&gt;The GPL does not require you to release your modified version. You are free to make modifications and use them privately, without ever releasing them. This applies to organizations (including companies), too; an organization can make a     modified     version and use it internally without ever releasing it outside the organization.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        But if you release the modified version to the public in some way, the GPL requires you to make the modified source code available to the program's users, under the GPL.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        Thus, the GPL gives permission to release the modified program in certain ways, and not in other ways; but the decision of whether to release it is up to you.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-7395445374663658303?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/7395445374663658303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=7395445374663658303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7395445374663658303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7395445374663658303'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/mpllgplgpl-tri-license.html' title='MPL/LGPL/GPL tri-license'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3528443469062533739</id><published>2007-06-07T03:10:00.000-07:00</published><updated>2007-06-07T17:22:48.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><title type='text'>Is sps and x4m here to stay and how to reduce the risk?</title><content type='html'>- the team vision of developing x4m is to create Real-time shared web applications. Using extensible gecko-browsers family as base, a lot of other add-ons could be added according to current user demands.&lt;br /&gt;   - SPS is an application to tryout and demo the feature of x4m.&lt;br /&gt;   - They are constantly &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/GoogleSoC07"&gt;upgrading x4m and SPS&lt;/a&gt;, such as implementing file transfer capability using Google's libjingle and Gateway interaction between MSN, AIM and Yahoo!&lt;br /&gt;   - &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/Community"&gt;list of team members&lt;/a&gt;, click names for profile.&lt;br /&gt;   - SPS and x4m are distributed as .xpi files, which can be easily extracted using any unzip utility. All the implementation codes are in there. (Reducing risk if they decided to stop development)&lt;br /&gt;   - very interesting points on &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocOverviewLocalApplications"&gt;Rapid development of rich clients and browser extensions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    - PROs:&lt;/span&gt;&lt;br /&gt;       - we can build TrueTalk on top of SPS as its extensions, or might as well create our own extension for firefox (need the codes to connect to gtalk)&lt;br /&gt;       - if we use x4m/sps, no need for intermediary servers, we only need firefox or its siblings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    - CONs:&lt;/span&gt;&lt;br /&gt;       - Only ran on gecko-based browsers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3528443469062533739?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3528443469062533739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3528443469062533739' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3528443469062533739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3528443469062533739'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/is-sps-and-x4m-here-to-stay-and-how-to.html' title='Is sps and x4m here to stay and how to reduce the risk?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-10033834909061794</id><published>2007-06-07T02:54:00.000-07:00</published><updated>2007-06-07T03:10:38.260-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scriplet'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>TrueTalk Demo</title><content type='html'>- put chatterbox up. DONE.&lt;br /&gt;      - &lt;a href="http://www.xulplanet.com/references/objref/KeyboardEvent.html"&gt;keyboard reference&lt;/a&gt;&lt;br /&gt;      - fix resize prob. DONE.&lt;br /&gt;      - find out why the : is being captured - Nothing being captured anymore.&lt;br /&gt;&lt;br /&gt;      -&lt;a href="http://blog.hyperstruct.net/2007/5/7/sameplace-meet-twitter-introducing-scriptlets"&gt;Scriptlets &lt;/a&gt;are micro-extensions in the form of self-contained JavaScript files, useful for prototyping new features or exchanging cool hacks with your friends. They are an experimental feature of the development branch, and you can access them via the "Actions -&gt; Scriptlets" menu.&lt;br /&gt;      - our demo is not a scriptlet yet, coz its not in a single .js file&lt;br /&gt;      - it's more like a shared application or extensions of SPS, for now.&lt;br /&gt;&lt;br /&gt;      - launched SPS and demo in &lt;span style="font-weight: bold;"&gt;Firefox &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;Flock&lt;/span&gt;:&lt;br /&gt;          - Error: Flock sends1 correct msg with 1 blank message in the next line&lt;br /&gt;          - Error: Flock doesn't set the focus back to the textbox after pressing ENTER&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img245.imageshack.us/img245/774/flockerrorcq8.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img245.imageshack.us/img245/774/flockerrorcq8.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Firefox is working &lt;span style="font-weight: bold;"&gt;fine&lt;/span&gt;.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img521.imageshack.us/img521/5641/chatlog2uz6.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img521.imageshack.us/img521/5641/chatlog2uz6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-10033834909061794?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/10033834909061794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=10033834909061794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/10033834909061794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/10033834909061794'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/truetalk-demo.html' title='TrueTalk Demo'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2292013662244738720</id><published>2007-06-06T06:59:00.000-07:00</published><updated>2007-06-06T07:15:45.408-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><title type='text'>TrueTalk on XUL</title><content type='html'>&lt;span style="font-weight: bold;"&gt;- why XHTML?&lt;/span&gt;&lt;br /&gt;  - Easier to code, similar to HTML but stricter.&lt;br /&gt;  - Supported in all current browser.&lt;br /&gt;  - will be rendered without problems on mobile devices.&lt;br /&gt;  - &lt;a href="http://www.w3schools.com/xhtml/xhtml_why.asp"&gt;ref&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- impressive &lt;a href="http://www.birgin.de/test/bugzilla/welcome/welcome.xul"&gt;demo &lt;/a&gt;of XUL + XHTML (interface-wise)&lt;br /&gt;  - to include HTML elements inside XUL, need to add "xmlns:html="http://www.w3.org/1999/xhtml" in [window] tag&lt;window&gt;&lt;br /&gt;  - define html element as &lt;html:element&gt;&lt;/html:element&gt;, eg&lt;/window&gt;&lt;window&gt;: [html:element][/html:element], eg: [html:div id="xmpp-incoming" style="border: 1px black solid"][/html:div]&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Successful attempts:&lt;/span&gt;&lt;br /&gt;  - Transform the demo chat app codes from html -&gt; XUL+XHTML - It works!&lt;br /&gt;- I've tried to put in on my server, but apparently my server need some configuration to display .xul files correctly. But you can still &lt;a href="http://hazrat.notathing.net/products/x4m/x4mtry.rar"&gt;get it here, and launch it locally&lt;/a&gt;. Let's try it together when we are both online.&lt;br /&gt;  - Once launched alongside SPS, both side of the chatroom must 'enable' the XHTML page in the right panel first, then only can start chatting on that page.&lt;br /&gt;  - The SPS right panel will then be disabled, meaning every message typed from it will not be sent.&lt;br /&gt;  - SPS way of doing things : Load XHTML file inside XUL page. Placement may use 'overlays'.&lt;br /&gt;  - Overlay = An overlay is used when it is desirable for a block of content to be shared between several different windows. In addition, it can be used to append or alter content in an existing window. An overlay is defined in a separate XUL file. Overlays are applied while the XUL is being loaded. (Works similar to CSS?)&lt;br /&gt;- A Screeny to top it of.&lt;br /&gt;&lt;/window&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img518.imageshack.us/img518/2843/xulplusxhtmlplusx4mpj8.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img518.imageshack.us/img518/2843/xulplusxhtmlplusx4mpj8.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;window&gt;&lt;span style="font-weight: bold;"&gt;- Links collection&lt;/span&gt;&lt;br /&gt;   - XUL Periodic table - &lt;a href="http://www.hevanet.com/acorbin/xul/top.xul"&gt;http://www.hevanet.com/acorbin/xul/top.xul&lt;/a&gt;&lt;br /&gt;   - CSS Query @ &lt;a href="http://blog.hyperstruct.net/2007/5/16/sameplace-spinoffs-1-css-query"&gt;http://blog.hyperstruct.net/2007/5/16/sameplace-spinoffs-1-css-query&lt;/a&gt;&lt;br /&gt;   - XHTML Validator @ &lt;a href="http://validator.w3.org/"&gt;http://validator.w3.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- So next, maybe i'll be focussing on how SPS connect to GTalk, and try to implement the codes inside this demo of mine.&lt;br /&gt;&lt;/window&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2292013662244738720?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2292013662244738720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2292013662244738720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2292013662244738720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2292013662244738720'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/truetalk-on-xul.html' title='TrueTalk on XUL'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-7675561530285643168</id><published>2007-06-05T04:20:00.000-07:00</published><updated>2007-06-06T00:48:02.924-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><title type='text'>XUL + xmpp4moz + SamePlace Suite : Problem encountered</title><content type='html'>- I have a working html+js codes that can capture xmpp packets when launched together with SamePlace Suite (SPS).&lt;br /&gt;- The plan is to understand the packet structure and internal functions (as shown in previous post) that xmpp4moz used to send xmpp packet. To do that, I try to port the html+js codes, into XUL+js codes.&lt;br /&gt;- Here is a demo chat page I've created using XUL.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img45.imageshack.us/img45/6853/xulsstm7.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img45.imageshack.us/img45/6853/xulsstm7.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Unfortunately, according to the developement docs [&lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocDescriptionRemoteApplications"&gt;here&lt;/a&gt;, and &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/DocRemoteApplicationDevelopment#Implementationnotes"&gt;here&lt;/a&gt;], SPS uses &lt;div&gt; tags with id = 'xmpp_incoming' to capture the packet, generated by the xmpp4moz lib internally.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  - Since I'm using XUL, I've tried to find an equivalent replacement for &lt;/span&gt;&lt;div style="font-style: italic;"&gt; tags in XUL, but to no avail.&lt;br /&gt;- I've already post this problem in their google group. Will search for other solution while waiting for their answer. [ may not be necessary since you can use the ff html/xml renderer to draw the incoming xml packets from xmpp4moz ]&lt;br /&gt;See &lt;a href="http://www.xulplanet.com/tutorials/xultu/htmlelem.html"&gt;tutorial&lt;/a&gt; on how to add html elements to the XUL UI&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-7675561530285643168?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/7675561530285643168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=7675561530285643168' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7675561530285643168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7675561530285643168'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/xul-xmpp4moz-sameplace-suite-problem.html' title='XUL + xmpp4moz + SamePlace Suite : Problem encountered'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2559307735467653224</id><published>2007-06-05T04:13:00.000-07:00</published><updated>2007-06-05T04:20:49.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>XUL : In-Depth Learning</title><content type='html'>- &lt;a href="http://www.xulplanet.com/tutorials/xultu/"&gt;tutorial reference&lt;/a&gt;&lt;br /&gt; - &lt;a href="http://www.xulplanet.com/references/elemref/"&gt;Element reference&lt;/a&gt;&lt;br /&gt; - There are several ways that XUL applications are created:&lt;br /&gt;  * &lt;span style="font-weight: bold;"&gt;Firefox extension&lt;/span&gt; - an extension adds functionality to the browser itself, often in the form of extra toolbars, context menus, or UI to customize the browser UI. This is done using a feature of XUL called an overlay, which allows the UI provided from one source, in this case, the Firefox browser, to be merged together with the UI from the extension. Extensions may also be applied to other Mozilla based products such as Thunderbird.&lt;br /&gt;  * &lt;span style="font-weight: bold;"&gt;Standalone XULRunner application&lt;/span&gt; - XULRunner is a packaged version of the Mozilla platform which allows you to create standalone XUL applications. A browser isn't required to run these applications, as they have their own executable file.&lt;br /&gt;  * &lt;span style="font-weight: bold;"&gt;XUL package&lt;/span&gt; - in between the other two are applications which are created in the same way as an extension, but they act like a separate application in a separate window. This is used when you don't want to have the larger size of a complete XULRunner application, but don't mind requiring a Mozilla browser to be installed to be able to run the application.&lt;br /&gt;  * &lt;span style="font-weight: bold;"&gt;Remote XUL application&lt;/span&gt; - you can also just place XUL code on a web server and open it in a browser, as you would any other web page. This method is limited however, as there will be security concerns that will limit the kinds of things you will be able to do, such as opening other windows.&lt;br /&gt; - &lt;span style="font-style: italic;"&gt;When the user downloads it, it will be installed onto the user's machine. It will hook into the browser using a XUL specific feature called an overlay which allows the XUL from the extension and the XUL in the browser to combine together. To the user, it may seem like the extension has modified the browser, but in reality, the code is all separate, and the extension may be uninstalled easily. Registered packages are not required to use overlays, of course. If they don't, you won't be able to access them via the main browser interface, but you can still access them via &lt;/span&gt;&lt;span style="font-style: italic;"&gt;the chrome URL, if you know what it is.&lt;/span&gt;&lt;br /&gt; - &lt;span style="font-style: italic;"&gt;Functions/node&lt;/span&gt; used for xmpp4moz and Frefox extensions:&lt;br /&gt;    - &lt;span style="font-weight: bold;"&gt;DOMNodeInserted &lt;/span&gt;: This event is sent when a node is added as a child of a element. If you capture this element at the document level, you can be notified of document changes (eg: Triggerred when incoming xmpp packet arrived).&lt;br /&gt;- xmpp4moz:: sample code/API&lt;br /&gt; - caught when a DOMNodeInserted event is triggered.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img158.imageshack.us/img158/9434/x4mxmppstanzauq6.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://img158.imageshack.us/img158/9434/x4mxmppstanzauq6.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2559307735467653224?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2559307735467653224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2559307735467653224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2559307735467653224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2559307735467653224'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/xul-in-depth-learning.html' title='XUL : In-Depth Learning'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-2567901389222851134</id><published>2007-06-05T02:55:00.000-07:00</published><updated>2007-06-05T03:00:16.855-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Oreilly book for firefox programming</title><content type='html'>&lt;span class="book-title" style="font-weight: bold;"&gt;&lt;a href="http://www.oreilly.com/catalog/9780596102432/"&gt; Programming Firefox&lt;/a&gt;  &lt;/span&gt;  &lt;span class="subtitle"&gt;Building Rich Internet Applications with XUL. Will have to see if it has anything over documentation on the web.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.xulplanet.com/tutorials/xultu/intro.html"&gt;Tutorial&lt;/a&gt; on programming XUL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-2567901389222851134?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/2567901389222851134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=2567901389222851134' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2567901389222851134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/2567901389222851134'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/oreilly-book-for-firefox-programming.html' title='Oreilly book for firefox programming'/><author><name>mersing</name><uri>http://www.blogger.com/profile/14273199767479755797</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4249122689864255217</id><published>2007-06-04T03:03:00.000-07:00</published><updated>2007-06-04T03:12:10.111-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='sameplace suite'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><title type='text'>SamePlace Suite, an xmpp4moz-&gt;Gtalk example</title><content type='html'>- They've got a gtalk client add-ons for Firefox called &lt;a href="http://dev.hyperstruct.net/xmpp4moz/wiki/LocalApplicationSamePlaceSuite"&gt;SamePlace Suite&lt;/a&gt;&lt;br /&gt;   - It adds a panel to the left of firefox.&lt;br /&gt;   - hide panel by pressing F12.&lt;br /&gt;   - They have a Monopoly-like game using xmpp4moz+google map!&lt;br /&gt;   - &lt;a href="http://blog.hyperstruct.net/2006/10/22/instant-messaging-two-point-o"&gt;demo video &lt;/a&gt;&lt;br /&gt;   - I didn't set it as auto-login, therefor every time an instance of Firefox is launching, it prompt me for password. Eg: TAG a url into del.icio.us, when a window popup&lt;br /&gt;   - Will keep on active as long as xmpp4moz is enabled.&lt;br /&gt;   - Solution: since I need xmpp4moz for development purpose, I must unistall SamePlace for now to avoid annoyance.&lt;br /&gt;   - Interesting fact: I failed to load a website, while connected via SamePlace. Reload a few times, still fails. Then I disconnect from SamePlace, then reload, at its OK. Might be some issues here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4249122689864255217?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4249122689864255217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4249122689864255217' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4249122689864255217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4249122689864255217'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/sameplace-suite-xmpp4moz-gtalk-example.html' title='SamePlace Suite, an xmpp4moz-&gt;Gtalk example'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3568358087696562948</id><published>2007-06-04T02:57:00.000-07:00</published><updated>2007-06-04T03:03:53.761-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><category scheme='http://www.blogger.com/atom/ns#' term='xulrunner'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>About Firefox addons, XUL, XULRunner</title><content type='html'>- &lt;span style="font-weight: bold;"&gt;Firefox &lt;/span&gt;Add-ons:&lt;br /&gt;   - uses XUL (JS+XHTML+CSS)&lt;br /&gt;   - reference @  &lt;a href="http://www.libsuccess.org/index.php?title=Web_Browser_Extensions#Websites_about_Firefox_Programming"&gt;http://www.libsuccess.org/index.php?title=Web_Browser_Extensions#Websites_about_Firefox_Programming&lt;/a&gt;&lt;br /&gt;   - followed tutorial @ &lt;a href="http://www.gmacker.com/web/content/tutorial/firefox/firefoxtutorial.htm"&gt;http://www.gmacker.com/web/content/tutorial/firefox/firefoxtutorial.htm&lt;/a&gt;&lt;br /&gt;   - decompiled SamePlace suite codes and see how xmpp4moz -&gt; gtalk works.&lt;br /&gt;   - Add-ons usually uses .js files. The different between this and JSJac is, we dont need to have a server that serve the webpages. But users need to download the Firefox '&lt;span style="font-style: italic;"&gt;plug-ins&lt;/span&gt;', which is usually small in size. And the add-ons run through Firefox.&lt;br /&gt;   - &lt;span style="font-weight: bold;"&gt;Possible comm. path: Firefox -&gt; Gtalk -&gt; Bot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;XULRunner&lt;/span&gt;&lt;br /&gt;   - Run XUL develoment codes without using &lt;span style="font-weight: bold;"&gt;Firefox&lt;/span&gt;&lt;br /&gt;   - Similar concept to &lt;span style="font-style: italic;"&gt;JVM Appletviewer&lt;/span&gt;.&lt;br /&gt;   - Tutorial @ &lt;a href="http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx"&gt;http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Browser-based VS Web-based&lt;/span&gt;&lt;br /&gt;   - Since Firefox has emerged as the most extensible browser ever, the term browser-based and web-based turns to a whole new meaning.&lt;br /&gt;   - Browser-based : What you launch inside your browser, not necessarily be connected to the internet. Ex: Firebug for debugging websites&lt;br /&gt;   - Web-based : Your website. Obivoiusly need to launch inside a browser with internet connectivity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3568358087696562948?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3568358087696562948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3568358087696562948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3568358087696562948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3568358087696562948'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/about-firefox-addons-xul-xulrunner.html' title='About Firefox addons, XUL, XULRunner'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4124822574485781595</id><published>2007-06-04T02:47:00.001-07:00</published><updated>2007-06-04T03:22:50.540-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp4moz'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><title type='text'>xmpp4moz: Getting it to work</title><content type='html'>- &lt;a href="http://dev.hyperstruct.net/xmpp4moz"&gt;http://dev.hyperstruct.net/xmpp4moz&lt;/a&gt;&lt;br /&gt;- found the only "Hello World" xmpp4moz tutorial, with a handful of bugs, which I've successfully repaired@ &lt;a href="http://www.pixzone.com/blog/84/embed-jabber-in-firefox-with-xmpp4moz-chat-application-how-to/"&gt;http://www.pixzone.com/blog/84/embed-jabber-in-firefox-with-xmpp4moz-chat-application-how-to/&lt;/a&gt;&lt;br /&gt;- sample of the stanza that xmpp4moz catches:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img257.imageshack.us/img257/1700/xmpp4mozss1nf6.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://img257.imageshack.us/img257/1700/xmpp4mozss1nf6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;get&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img404.imageshack.us/img404/9514/xmpp4mozss2ho7.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://img404.imageshack.us/img404/9514/xmpp4mozss2ho7.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img463.imageshack.us/img463/2618/xmpp4mozss3es4.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://img463.imageshack.us/img463/2618/xmpp4mozss3es4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;get&gt;&lt;br /&gt;&lt;get roster=""&gt;&lt;get&gt;&lt;br /&gt;&lt;get&gt;&lt;/get&gt;&lt;/get&gt;&lt;/get&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img364.imageshack.us/img364/4194/xmpp4mozss4yf1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://img364.imageshack.us/img364/4194/xmpp4mozss4yf1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;get roster=""&gt;&lt;get&gt;&lt;get&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;local&gt;&lt;local&gt;&lt;br /&gt;- this chat app demonstrate the usage of xmpp4moz.&lt;br /&gt;- to use this, you must login to a jabber account using SamePlace Suite 1st.&lt;br /&gt;- then activate the chat page by clicking a button in the SamePlace side panel.&lt;br /&gt;- for detail explanation, refer to &lt;a href="http://www.pixzone.com/blog/84/embed-jabber-in-firefox-with-xmpp4moz-chat-application-how-to/"&gt;here&lt;/a&gt;.&lt;/local&gt;&lt;/get&gt;&lt;/get&gt;&lt;/get&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4124822574485781595?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4124822574485781595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4124822574485781595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4124822574485781595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4124822574485781595'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/httpdev.html' title='xmpp4moz: Getting it to work'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8823450884329590634</id><published>2007-06-04T02:16:00.000-07:00</published><updated>2007-06-04T02:20:15.389-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='smack'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp'/><category scheme='http://www.blogger.com/atom/ns#' term='servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='java2script'/><title type='text'>Why need Tomcat to run js2gtalk?</title><content type='html'>Here's a reply from one of the author of J2S, in their google groups:          &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Zhou Renjian &lt;/span&gt; &lt;br /&gt;From: "Zhou Renjian" &lt;zhourenj...@gmail.com&gt;&lt;br /&gt;Date: Sat, 2 Jun 2007 11:16:21 +0800&lt;br /&gt;Local: Sat, Jun 2 2007 11:16 am&lt;br /&gt;&lt;br /&gt;Subject: &lt;span style="font-style: italic;"&gt;Re: J2S Gtalk demo : Why do we need to deploy it on Servlet Container (ie. Tomcat)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is how the current Java2Script GTalk works: Java2Script GTalk&lt;br /&gt;(browser side) packs some message into HTTP request, send to Apache&lt;br /&gt;server. And Apache server redirects requests to Tomcat server (Java&lt;br /&gt;Servlet container). Then Java Servlet setups and keeps a  XMPP&lt;br /&gt;connection to Google Talk Jabber server using Smack library, and then&lt;br /&gt;sends out request, and responses Jabber server's response, which will&lt;br /&gt;redirected to Apache server. And Apache server then returns responses&lt;br /&gt;through HTTP connection to browser. Java2Script GTalk finally updates&lt;br /&gt;its messages or status.&lt;br /&gt;&lt;br /&gt;The reason why there is a Tomcat server is that Apache server is not&lt;br /&gt;designed to execute Java codes while Tomcat is. And in fact, you can&lt;br /&gt;build up Java2Script GTalk without Apache server. Tomcat  is already&lt;br /&gt;an HTTP server. And the connection will be simplified to:&lt;br /&gt;Java2Script GTalk &lt;--HTTP--&gt; Tomcat &lt;--XMPP (Jabber) [Smack] --&gt; GTalk Server&lt;br /&gt;&lt;br /&gt;BTW: you can run Java2Script GTalk standalone as SWT desktop&lt;br /&gt;application with a Java VM environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See the &lt;span style="font-style: italic;"&gt;communication path&lt;/span&gt; :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8823450884329590634?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8823450884329590634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8823450884329590634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8823450884329590634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8823450884329590634'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/why-need-tomcat-to-run-js2gtalk.html' title='Why need Tomcat to run js2gtalk?'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4048578690034118781</id><published>2007-06-04T02:10:00.000-07:00</published><updated>2007-06-04T02:16:20.485-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='java2script'/><title type='text'>How-To make and test Java2Script working (properly)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Here are the ways you should follow:&lt;/span&gt;&lt;br /&gt;   1) Refer to &lt;a href="http://j2s.sourceforge.net/update/"&gt;http://j2s.sourceforge.net/update/&lt;/a&gt;&lt;br /&gt;   2) Download and install IDE for Java (&lt;a href="http://www.eclipse.org/downloads/"&gt;Eclipse&lt;/a&gt; is recommended by J2S developers)&lt;br /&gt;   2) Download the J2S library using Eclipse's Update Manager. Choose the default sourceforge.net server. This is to ensure you'll get the library that is &lt;span style="font-weight: bold;"&gt;100% compatible&lt;/span&gt; with your IDE.&lt;br /&gt;   3) To test your newly setup environment, follow the tutorial @ &lt;a href="http://j2s.sourceforge.net/articles/getting-started.html"&gt;http://j2s.sourceforge.net/articles/getting-started.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4048578690034118781?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4048578690034118781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4048578690034118781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4048578690034118781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4048578690034118781'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/how-to-make-and-test-java2script.html' title='How-To make and test Java2Script working (properly)'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-574694579261789631</id><published>2007-06-01T21:30:00.000-07:00</published><updated>2007-06-06T00:39:30.005-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xiff'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalkr'/><category scheme='http://www.blogger.com/atom/ns#' term='smack'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='java2script'/><title type='text'>More info on XIFF and j2sgtalk</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Xiff+Flash to Gtalk&lt;/span&gt;&lt;br /&gt; - Still none existed (none found even in their developers forum)&lt;br /&gt; - they always persistence in their own MUC client - &lt;a href="http://xiffian.sourceforge.net/test/"&gt;http://xiffian.sourceforge.net/test/&lt;/a&gt;&lt;br /&gt; - There are some cross-domain issues that didn't allow flash clients to connect to other jabber server&lt;br /&gt; - Flash-based apps has advantage both in easy-deployment, as well as rich graphical, vector-based content, proven when the Gtalkr guys are being hired by google. But I didn't found any statement that google will have them use XIFF (Correct me if I'm wrong). There's a possibility that they'll use internal google own library (will continue researching on this)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why need Tomcat to run js2gtalk?&lt;/span&gt;&lt;br /&gt; - It uses Java Backends (&lt;a href="http://www.igniterealtime.org/projects/smack/"&gt;Smack&lt;/a&gt;) to connect to GTalk server. Only Tomcat can execute those Java codes.&lt;br /&gt; - Tomcat uses the Jasper converter to turn JSPs into servlets for execution.&lt;br /&gt; - "It's wise to keep Java code out of your JSPs as much as possible, and put it in either Java taglibs, or in Java beans of EJBs. Your servlet should act primarily as a "traffic copy", receiving requests from the user and directing those requests to the appropriate methods defined in Java beans or EJBs, and then forwarding the response to the appropriate JSP to render the proper view. This design pattern is called "Model-View-Controller" and was made famous in the book "Design Patterns". I strongly recommend this book to anyone serious about moving beyond "hacking code" and doing serious program architecture and design." - &lt;a href="http://forum.java.sun.com/thread.jspa?threadID=531586&amp;messageID=2561649"&gt;http://forum.java.sun.com/thread.jspa?threadID=531586&amp;amp;messageID=2561649&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; - Possibility: Chat app need open socket connection for message transfer to work. For non-web-based app (JAVA+Smack), the OS handles this. but for web-based app (AJAX), the server is the one responsible for this. In our case, Tomcat uses servlets that has been "deployed" as part of it engine, to open connection to gtalk server. This relates to how Punjab works, by "deploying" itself using the python engine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, I'll be focusing my reseach on  xmpp4moz and creating Firefox add-ons.&lt;br /&gt;&lt;br /&gt;Comments are appreciated :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-574694579261789631?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/574694579261789631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=574694579261789631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/574694579261789631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/574694579261789631'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/more-info-on-xiff-and-j2sgtalk.html' title='More info on XIFF and j2sgtalk'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4895971433033758939</id><published>2007-06-01T04:22:00.000-07:00</published><updated>2007-06-06T00:40:13.021-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mod_jk'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Update'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><category scheme='http://www.blogger.com/atom/ns#' term='Patch'/><category scheme='http://www.blogger.com/atom/ns#' term='java2script'/><title type='text'>Java2Script Google Talk: Deploying-Customizing</title><content type='html'>Here are my findings for today:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://j2s.sourceforge.net/update/"&gt;get J2S from eclipse update manager&lt;/a&gt;&lt;br /&gt;===================================&lt;br /&gt;- used &lt;a href="http://j2s.sourceforge.net/update/"&gt;http://j2s.sourceforge.net/update&lt;/a&gt;&lt;br /&gt;- tried using mirror from Ishikawa Japan, gave out wrong version&lt;br /&gt;- retry, got latest version from The default site [j2s 1.0.0v5.2.0]. Easiest &amp; u'll get the latest version.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;connecting to gtalk using j2s&lt;br /&gt;=============================&lt;br /&gt;- need a servlet container&lt;br /&gt;- apache tomcat engine (&lt;a href="http://tomcat.apache.org/index.html"&gt;http://tomcat.apache.org/index.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;- Tomcat Engine ver x.x?&lt;br /&gt;- Apache Tomcat caters jsp spec from various version (&lt;a href="http://tomcat.apache.org/whichversion.html"&gt;http://tomcat.apache.org/whichversion.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Tomcat connector?&lt;br /&gt;- it's mod_jk!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- mod_jk?&lt;br /&gt;- mod_jk is a replacement to the elderly mod_jserv. It is a completely new Tomcat-Apache plug-in that handles the communication  between Tomcat and Apache. (&lt;a href="http://tomcat.apache.org/tomcat-3.2-doc/mod_jk-howto.html"&gt;http://tomcat.apache.org/tomcat-3.2-doc/mod_jk-howto.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- installing apache tomcat&lt;br /&gt;- in C:\Program Files\Apache Software Foundation\Tomcat 6.0&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img261.imageshack.us/img261/2581/installtomcatgy3.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://img261.imageshack.us/img261/2581/installtomcatgy3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- no need to run wamp and tomcat at the same time?&lt;br /&gt;- successfully ran tomcat without wamp (put offline + stop all service)&lt;br /&gt;&lt;br /&gt;- configuring apache, tomcat @ &lt;a href="http://tomcat.apache.org/tomcat-3.2-doc/mod_jk-howto.html"&gt;http://tomcat.apache.org/tomcat-3.2-doc/mod_jk-howto.html&lt;/a&gt;&lt;br /&gt;1) remove mod_jserv if exist, including tomcat-apache.conf or tomcat.conf in httpd.conf&lt;br /&gt;2) ..halt!&lt;br /&gt;&lt;br /&gt;- Running J2S gtalk client on localhost succeeded!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img505.imageshack.us/img505/2456/j2sgtalksuccessfl4.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://img505.imageshack.us/img505/2456/j2sgtalksuccessfl4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- known bug:&lt;br /&gt;- u'll stay online on you buddy's roster's after you logout&lt;br /&gt;- but after 2 minutes, u'll be offline in the chat window, still online on their roster&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img382.imageshack.us/img382/5572/j2sgtalklogoutui0.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://img382.imageshack.us/img382/5572/j2sgtalklogoutui0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- recompiling j2sgtalk demo:&lt;br /&gt;- It uses SMACK!&lt;br /&gt;- possible comm. path : Java+Smack+J2S -&gt; Javascript -&gt; Tomcat -&gt; Gtalk -&gt; Conf. Bot&lt;br /&gt;- recompile success, but nothing appear after deploy and launch, the original web.xml are much more complex than what i did.&lt;br /&gt;&lt;br /&gt;- running j2sgtalk on plain server&lt;br /&gt;- unsuccessful&lt;br /&gt;&lt;br /&gt;- simply copy/paste j2sgtalk folder into Tomcat root dir&lt;br /&gt;- eventhough it shows as a tomcat app in the tomcat manager page, it still wont work.&lt;br /&gt;- possible cause: the web.xml points to classes &amp;amp; libs that need to be loaded inside tomcat, as part of its module&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- ajaxrpc?&lt;br /&gt;- is part of junit.framework.TestCase - &lt;a href="http://jsourcery.com/api/apache/webservices/axis/1.4/test/jaxrpc/AJAXRPC.html"&gt;http://jsourcery.com/api/apache/webservices/axis/1.4/test/jaxrpc/AJAXRPC.html&lt;/a&gt;&lt;br /&gt;- IMO: is a testing/debugging library for ajax&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- xiff+gtalk?&lt;br /&gt;- as of today...no one has ever done it.&lt;br /&gt;- limitations and possible workarounds - &lt;a href="http://www.igniterealtime.org/forum/message.jspa?messageID=103593"&gt;http://www.igniterealtime.org/forum/message.jspa?messageID=103593&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- What's up next?&lt;br /&gt;- xmpp4moz - XMPP for Mozilla - &lt;a href="http://dev.hyperstruct.net/xmpp4moz"&gt;http://dev.hyperstruct.net/xmpp4moz&lt;/a&gt;&lt;br /&gt;- XMPP Library for firefox - &lt;a href="http://www.bolinfest.com/changeblog/2007/03/31/request-for-help-xmpp-library-for-firefox/"&gt;http://www.bolinfest.com/changeblog/2007/03/31/request-for-help-xmpp-library-for-firefox/&lt;/a&gt;&lt;br /&gt;-  Websites about Firefox Programming - &lt;a href="http://www.libsuccess.org/index.php?title=Web_Browser_Extensions#Websites_about_Firefox_Programming"&gt;http://www.libsuccess.org/index.php?title=Web_Browser_Extensions#Websites_about_Firefox_Programming&lt;/a&gt;&lt;br /&gt;- XMPP library for JAVA - &lt;a href="http://www.igniterealtime.org/projects/smack/"&gt;http://www.igniterealtime.org/projects/smack/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4895971433033758939?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4895971433033758939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4895971433033758939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4895971433033758939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4895971433033758939'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/java2script-google-talk-deploying.html' title='Java2Script Google Talk: Deploying-Customizing'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-7852587739388248321</id><published>2007-06-01T01:27:00.001-07:00</published><updated>2007-06-01T05:12:19.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Design thoughts</title><content type='html'>There seems to be a few ways to get a browser app to talk to gtalk.&lt;br /&gt;&lt;br /&gt;1.   Ajax  ------ punjab/tomcat/java servlet -------  Gtalk&lt;br /&gt;&lt;br /&gt;The intermediary is because Ajax / Html is stateless and gtalk/jabber requires a statefull system. One success is by using  &lt;a href="http://truetalkdev.blogspot.com/2007/05/java2script.html"&gt;java2script&lt;/a&gt; library which Hazrat has shown can connect to gtalk. One issue will be the latency introduced by the &lt;a href="http://digg.com/software/Java2Script_version_of_Google_Talk"&gt;middle servlet module&lt;/a&gt; in java2script system.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img505.imageshack.us/img505/2456/j2sgtalksuccessfl4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px;" src="http://img505.imageshack.us/img505/2456/j2sgtalksuccessfl4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;                                                                       (note the java2script client is on the left)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;We will also need to build a conference bot to simulate chat in gtalk and the hops will be:&lt;br /&gt;&lt;br /&gt;Ajax ------ tomcat -------- gtalk --------- conference bot&lt;br /&gt;&lt;br /&gt;which will add additional latency.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.  Flash ----- Gtalk&lt;br /&gt;&lt;br /&gt;Not sure if this needs an intermediary since Flash should be able to maintain state.&lt;br /&gt;Potential libraries are &lt;a href="http://www.igniterealtime.org/projects/xiff/index.jsp"&gt;Ignite's XIFF AP&lt;/a&gt;I and &lt;a href="http://sourceforge.net/projects/jabberflash"&gt;jabberflash.&lt;/a&gt;&lt;br /&gt;They can talk to jabber servers, but not sure about gtalk yet. Hazrat ?&lt;br /&gt;Since google's gtalk gadget is written in flash, this might be the way to go.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://antecipate.blogspot.com/2006/09/flash-fat-belly.html"&gt;article on XIFF &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Firefox extension ---- Gtalk&lt;br /&gt;&lt;br /&gt;This has potential, though the application development could be tougher because parts of it have to be built in XUL &amp;amp; C (verify ?)&lt;br /&gt;Potential library &lt;a href="http://dev.hyperstruct.net/xmpp4moz"&gt;xmpp4moz.&lt;/a&gt;&lt;br /&gt;Verify if it can talk to gtalk. Hazrat ?&lt;br /&gt;Interesting &lt;a href="http://www.libsuccess.org/index.php?title=Web_Browser_Extensions#Websites_about_Firefox_Programming"&gt;links&lt;/a&gt; on programming Firefox&lt;br /&gt;&lt;br /&gt;4. Java -- Gtalk&lt;br /&gt;Ignite's &lt;a href="http://www.igniterealtime.org/projects/smack/"&gt;Smack API&lt;/a&gt;&lt;br /&gt;Interesting &lt;a href="http://www.bolinfest.com/changeblog/2007/03/31/request-for-help-xmpp-library-for-firefox/"&gt;Bolinfest article &lt;/a&gt;on it.&lt;br /&gt;&lt;br /&gt;This would be like the original OnChat and will suffer from the problems&lt;br /&gt;of developing an attractive small java applet for the browser - not so keen on this approach.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-7852587739388248321?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/7852587739388248321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=7852587739388248321' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7852587739388248321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7852587739388248321'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/06/design-thoughts.html' title='Design thoughts'/><author><name>mersing</name><uri>http://www.blogger.com/profile/14273199767479755797</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8510862724089052071</id><published>2007-05-31T03:50:00.000-07:00</published><updated>2007-06-01T05:45:46.514-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><category scheme='http://www.blogger.com/atom/ns#' term='logistic'/><title type='text'>Office Charges / Rents</title><content type='html'>Even though this is out of the topic :P It's a good fact to know about how office spaces are being charged.&lt;br /&gt;&lt;br /&gt;I have the privilege of setting up my own office for my Industrial Training. Now, I don't think there ever a student who need to setup their own office for IT. It is a very good life experience.&lt;br /&gt;&lt;br /&gt;According to Mr. Shahril, rents are assigned according to the office logistics. Here's a list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Mersing : RM0.25/sqft&lt;/li&gt;&lt;li&gt;TM Tower: RM1.25/sqft&lt;/li&gt;&lt;li&gt;KLCC: RM6 - RM8/sqft&lt;/li&gt;&lt;li&gt;PJ: TBA :D&lt;/li&gt;&lt;/ul&gt;Each employee requires about 100-150 sqft of area which includes&lt;br /&gt;bathroom &amp;amp; common areas. So if there is an office of 10 people, you need about 1000 - 1500 sq ft of space.&lt;br /&gt;And the total amount should be Room size x price/sqft.&lt;br /&gt;&lt;br /&gt;For the office in PJ, I think the space the provide me is around 8x8 ft, enough for a PC table and a chair.  There are 2 more tables and chair set in the other side of the room, I'm not sure whether there are people there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8510862724089052071?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8510862724089052071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8510862724089052071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8510862724089052071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8510862724089052071'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/office-charges-rents.html' title='Office Charges / Rents'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4377414807794974326</id><published>2007-05-31T03:45:00.000-07:00</published><updated>2007-06-06T00:40:43.663-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='toolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='java2script'/><title type='text'>Java2Script</title><content type='html'>Its a great tool for Java expert to simply convert their existing java app into web-based app. We can easily use &lt;span style="font-weight: bold;"&gt;SWT &lt;/span&gt;(Standard Windows Toolkit), to create the UI part.&lt;br /&gt;&lt;br /&gt;I've tried the J2S with 2 apps. the 1st one is a simple, console-based HELLO WORLD java app and 2nd one is the HELLO WORLD app using SWT. Both can be run successfully using Eclipse.&lt;br /&gt;&lt;br /&gt;After that, I tried running both apps as J2S app. The simple (non-SWT) app run OK, but not the one using SWT. I've checked SWT version, the J2S, all docs and tutorial on the net, but to no avail. I even post on their google groups but there are still no response. Here's a screeen shot of the error:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img374.imageshack.us/img374/4557/swterror20070531qs9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px;" src="http://img374.imageshack.us/img374/4557/swterror20070531qs9.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm not sure where "Line: 25" refers to, as there are certainly less than 25 lines in my codes. It maybe part of the loader that is trying to load the supposedly created .js file.&lt;br /&gt;&lt;br /&gt;I found out that, for the non-SWT app, J2S has converted it's code into a .js file. But there is no .js file for the app with SWT. There maybe clashes between those 2 libraries. Posted this issue in their group too.&lt;br /&gt;&lt;br /&gt;I'm sure its an error related to my IDE, but I'm still trying to rectify it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4377414807794974326?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4377414807794974326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4377414807794974326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4377414807794974326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4377414807794974326'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/java2script.html' title='Java2Script'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3438357022500052807</id><published>2007-05-30T10:40:00.000-07:00</published><updated>2007-06-01T01:46:38.688-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Punjab</title><content type='html'>I happened to have access to their SVN and using that, I've updated my Punjab to the latest version. When I tried to install punjab, it returns this error :&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/python2.3/distutils/dist.py:227: UserWarning: Unknown distribution option: 'package_data' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  warnings.warn(msg)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;According to &lt;a href="http://plone.org/products/instance-manager/issues/2"&gt;plone website&lt;/a&gt;, it may because Iwas trying to install it on Python 2.3 (That was the version of Python on our server). Maybe it would be ok if I run it on different version of Python. I have version 2.4 and 2.5, since it also requires modification on the server, I'll put it on hold for a while.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3438357022500052807?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3438357022500052807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3438357022500052807' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3438357022500052807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3438357022500052807'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/punjab.html' title='Punjab'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-8836334057635432125</id><published>2007-05-30T10:31:00.000-07:00</published><updated>2007-06-01T01:47:27.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='groupchat'/><category scheme='http://www.blogger.com/atom/ns#' term='bot'/><title type='text'>Globsy</title><content type='html'>The main purpose for this framework is to setup a BOT that represents you on your gtalk account, sort of automatic response unit of some sort. Since it is a BOT for gtalk users, there's a slight possibility that we can manipulate it to be the liaison to the gtalk server.&lt;br /&gt;&lt;br /&gt;I've tried it also for a few hours. It has many dependencies that need to be installed. Luckily I have installed it all except a C library called &lt;a href="http://curl.haxx.se/"&gt;cURL&lt;/a&gt;. The documentation for it is very limited. At the end of the day, I email the author of Globsy asking for help and he replied with a couple of advices.&lt;br /&gt;&lt;br /&gt;Since it does require major modification to the server, I put it on hold too, so that i could lay my hands on Punjab once more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-8836334057635432125?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/8836334057635432125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=8836334057635432125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8836334057635432125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/8836334057635432125'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/globsy.html' title='Globsy'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-7409750069662969727</id><published>2007-05-30T10:16:00.000-07:00</published><updated>2007-06-01T01:48:10.807-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>JabberHTTPBind</title><content type='html'>Tried &lt;span style="font-weight: bold;"&gt;JHB &lt;/span&gt;for a few hours. It can't work properly because I have not install any servlet container (ie: &lt;span style="font-style: italic;"&gt;Tomcat&lt;/span&gt;). I will try to install &lt;a href="http://tomcat.apache.org/index.html"&gt;Tomcat for Apache&lt;/a&gt; later, but for now, i'll try to figure out the simplest way to setup a connection between our server and GTalk, that didn't require major server modification.&lt;br /&gt;&lt;br /&gt;The author has setup a website combining JWChat with JHB &lt;a href="https://www.jwchat.org/"&gt;here&lt;/a&gt;. If you use the default server, then it'll work out OK. But when I try to connect to GTalk, multiple times with various settings,  it won't work. I've post some question on the development blog &lt;a href="http://zeank.in-berlin.de/jhb/"&gt;here&lt;/a&gt;, and still waiting for the response.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-7409750069662969727?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/7409750069662969727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=7409750069662969727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7409750069662969727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/7409750069662969727'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/jabberhttpbind.html' title='JabberHTTPBind'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-3079681177158663354</id><published>2007-05-30T08:54:00.000-07:00</published><updated>2007-06-07T17:13:25.388-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='punjab'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='jwchat'/><title type='text'>Tools of Trade</title><content type='html'>Here are the tools that may help us:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Punjab :&lt;/span&gt;&lt;br /&gt;- is a HTTP jabber client interface. It is a SOAP, XMLRPC, JEP-0025 or JEP-0124 server that allows persistent client connections to a jabber server. It can be used for many things, but its main purpose is to allow for stateless applications (ie web) a stateful connection to jabber. &lt;a href="http://www.butterfat.net/wiki/Projects/PunJab"&gt;LINK&lt;/a&gt;&lt;br /&gt;&lt;a href="http://punjab.sourceforge.net/jwchat.html"&gt;jwchat &amp; Punjab&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;jabberHTTPBind (JHB) :&lt;/span&gt;&lt;br /&gt;- is a java servlet implementing JEP-0124 (HTTP Binding) thus enabling you to connect to any Jabber™ server by way of HTTP Binding. &lt;a href="http://zeank.in-berlin.de/jhb/"&gt;LINK&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Globsy :&lt;/span&gt;&lt;br /&gt;- Globsy is a PHP bot framework for the Google Talk network that can be executed from a regular browser on a PHP enabled server, connect to the Google Talk network and continue running in the background, without the browser needing to remain open. &lt;a href="http://globsy.sourceforge.net/index.php?page="&gt;LINK&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java2Script :&lt;/span&gt;&lt;br /&gt;- java2Script (J2S) Pacemaker provides an Eclipse Java to JavaScript compiler plugin and an implementation of JavaScript version of Eclipse Standard Widget Toolkit (SWT) with other common utilities, such as java.lang.* and java.util.*. You can convert your SWT-base Rich Client Platform (RCP) into Rich Internet Application (RIA) by Java2Script Pacemaker. &lt;a href="http://j2s.sourceforge.net/"&gt;LINK&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-3079681177158663354?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/3079681177158663354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=3079681177158663354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3079681177158663354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/3079681177158663354'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/tools-of-trade.html' title='Tools of Trade'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011889470751991096.post-4141585444631618950</id><published>2007-05-30T00:33:00.000-07:00</published><updated>2007-06-07T17:10:57.130-07:00</updated><title type='text'>Da intro...</title><content type='html'>Welcome to the blog for the research and development of xmpp and web2.0 technology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7011889470751991096-4141585444631618950?l=truetalkdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://truetalkdev.blogspot.com/feeds/4141585444631618950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7011889470751991096&amp;postID=4141585444631618950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4141585444631618950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7011889470751991096/posts/default/4141585444631618950'/><link rel='alternate' type='text/html' href='http://truetalkdev.blogspot.com/2007/05/da-intro.html' title='Da intro...'/><author><name>H</name><uri>http://www.blogger.com/profile/14164613746171199933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.mgdc.com.my/uploads/cavt4650a9003e5fa.gif'/></author><thr:total>0</thr:total></entry></feed>
