﻿<?xml version="1.0" encoding="utf-8"?><rss version="1.0"><channel><title>Ecma262 @ Netxion.net Weblog</title><link>http://ecma262.netxion.net/Weblog</link><description>Netxion Javascript library weblog 5/15/2008 10:16:47 PM</description><language>en</language><generator /><item><creator></creator><title>Problem with the Netxion.Net.TelnetSession solved</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=180</link><pubDate>5/15/2008 10:16:47 PM</pubDate><guid /><description>
							&lt;p&gt;Due to the attribute value normalization the telnet session failed with the Internet Explorer browser. &lt;/p&gt;
							&lt;p&gt;&lt;p&gt;As determined by the recommendation at w3.org (&lt;a href="http://www.w3.org/TR/2006/REC-xml-20060816/#AVNormalize" target="_blank"&gt;ref&lt;/a&gt;) all line-breaks in attribute values should be normalized to #xA. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unfortunately our objects..&lt;br /&gt;&lt;/strong&gt;Used the &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; before setting it to the xml attribute wich results in malfunction of multi-line telnet sessions. Rethinking the configuration resulted in the obvious solution wich is applied to the server-side script. By trimming the telnet command and adding a &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; to it before sending it to the server solved the problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Browsers &lt;/strong&gt;&lt;br /&gt;The problem was detected with IE wich is conform the w3 recommendation. Scripts are mainly tested with the mozilla browser as it has good support for javascript debugging.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>The addition of the keyboard device</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=179</link><pubDate>5/12/2008 4:20:47 PM</pubDate><guid /><description>
							&lt;p&gt;Similar to the mouse device, here's the keyboard device and special key enumeration.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;Keyboard events can now be detected and handled with the Netxion scripts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Netxion.Ui.Devices.KeyBoard&lt;br /&gt;&lt;/strong&gt;The keyboard device adds functionality for keyboard event detection. As it interfaces &lt;a href="/jsdoc/?class=Netxion.IEvent"&gt;Netxion.IEvent&lt;/a&gt;&amp;nbsp;multiple events can be attached for several key state changes. It also adds indications whether control keys like 'Control' or 'Shift' are held down.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Netxion.Ui.Devices.KeyMap&lt;br /&gt;&lt;/strong&gt;Special keys are named, the names map to their keyCode wich can be resolved from the Keyboard device.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Netxion.Ui.Controls.Window and Netxion.Ui.Controls.Form ready for injection</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=178</link><pubDate>5/12/2008 4:19:28 PM</pubDate><guid /><description>
							&lt;p&gt;The classes have been extendend with a functionality to be used with the Netxion.Ui.Injector. &lt;/p&gt;
							&lt;p&gt;&lt;p&gt;After the addition of the Netxion.IEvent to it's parent object Netxion.Ui.Controls.Control, the object has been&amp;nbsp;extended with event handlers for injection. &lt;/p&gt;
&lt;p&gt;Setting an element executes the the fireEvent handlers for &amp;quot;onsetelement&amp;quot; wich will adjust the element to become a HTMLTable element wich can be resized and moved.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Small note for SEO poeple using javascripts</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=177</link><pubDate>4/22/2008 12:04:33 PM</pubDate><guid /><description>
							&lt;p&gt;Some searchengines don't inedx pages with hyperlinks contained in hidden boxes.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;&lt;strong&gt;Problem: Searchengines do not index pages&lt;/strong&gt;&lt;br /&gt;When using javascripts to enhance our websites with the optinal appearance of certain not so important information. We should make sure this information does not contain any hyperlinks c.q.&amp;nbsp;'a' tag. Although Google does sympathize with us, the rest doesn't. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution: Replace 'a' tags with 'span' tags&amp;nbsp;and onclick&lt;/strong&gt;&lt;br /&gt;The main problem is the searchengine using the 'a' tag to crawl referenced pages. Once a page has been indexed it will be evaluated whereafter it will be index or not, if it detects hidden links it'll think you're faking the audience and therefor rejects the page. And ofcourse using the onclick event will not make the crawler inspect the referenced page, this problem can be solved with a sitemap page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using GA?&lt;/strong&gt;&lt;br /&gt;Google analytics, the free analytical tool from&amp;nbsp;Google,&amp;nbsp;can be used with ajax calls to track visitors using these functions to get information. More info see: &lt;a href="http://www.google.com/support/analytics/bin/answer.py?hl=en-ch&amp;amp;answer=55519" target="_blank"&gt;http://www.google.com/support/analytics/bin/answer.py?hl=en-ch&amp;amp;answer=55519&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Modified Netxion.Ui.Devices.Mouse</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=176</link><pubDate>4/21/2008 11:44:44 AM</pubDate><guid /><description>
							&lt;p&gt;The mouse class had the abillity to create event listeners, with the Netxion.IEvent interface implemented we could consider this obsolete.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;&lt;strong&gt;Netxion.Ui.Devices.Mouse now relies on Netxion.IEvent&lt;/strong&gt;&lt;br /&gt;Instead of creating handler references for the object, it now contains them due the implementation of Netxion.IEvent. Events can now be managed with the .attachEvent and .removeEvent handlers. For mouse object itself has the abillity to bind and unbind the internal references with .activate and .deactivate methods.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Added Netxion.IEvent to Netxion.Ui.Controls.Control</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=175</link><pubDate>4/20/2008 10:43:08 AM</pubDate><guid /><description>
							&lt;p&gt;The Netxion.IEvent interface adds event stacking to objects. For the Netxion.Ui.Controls.Control this was added to the events wich are used internally.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;&lt;strong&gt;Extending objects due Event handler stacking..&lt;/strong&gt;&lt;br /&gt;By adding more than one handler&amp;nbsp;&amp;nbsp;to certain events we can extend object functionality without overriding. With the handlers defined as a&amp;nbsp;class specific method we can easily turn them of and on with .attachEvent and .removeEvent methods.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>New event interface Netxion.IEvent</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=174</link><pubDate>4/19/2008 1:42:14 AM</pubDate><guid /><description>
							&lt;p&gt;The Netxion.IEvent interface adds the abillity for stacking of handlers per event.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;&lt;strong&gt;Event Interface for stacking events per event name&lt;/strong&gt;&lt;br /&gt;This interface adds a few methods to a class for event situations. With the attachEvent method events can added for a certain event name. The removeEvent method drops a handler for the event and fireEvent will run down de list of handlers for execution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IEvent.attachEvent&lt;br /&gt;&lt;/strong&gt;Attaches an event for that name, of the name does not yet exist it will iniatilize an array for it and pushes the new handler on the stack.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IEvent.removeEvent&lt;/strong&gt;&lt;br /&gt;Checks the existance of a handler for that specified event name, if it exists it will be removed else nothing happense.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IEvent.fireEvent&lt;/strong&gt;&lt;br /&gt;Execute the list of handlers for the named event, every handler in the list will be executed in order. If the event does not exists nothing happense.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Revision of the Netxion.Ui.Controls.RichTextBox + dependants</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=173</link><pubDate>4/17/2008 12:50:52 AM</pubDate><guid /><description>
							&lt;p&gt;With some new features in play we've had to change the RichTextBox for the sake of code reduction.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;New features such as Netxion.IEvent and Netxion.Delegate would extend the functionality of the RichTextBox especially on the reuse part.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Netxion.Delegate object&lt;/strong&gt;&lt;br /&gt;Actually the Netxion.TimedDelegate was used to periodically check the .element property whether it is attached to the document. -- Only&amp;nbsp;elements&amp;nbsp;in the document tree can be set to editable --&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;getXhtml serves getValue&lt;/strong&gt;&lt;br /&gt;Anyone who want's the sweet browser specific markup can pull it from the ._document.body.innerHTML property, we have IE generating HTML wich is conform some undefined standard and FF adds it's specific attributes wich aswell makes no sense for us.. humans. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sourceview&lt;/strong&gt;&lt;br /&gt;Added to the command list and filtered out on the .execute method is the 'ToggleSource' command. Using this will call the ._toggleSouce method&amp;nbsp;on the object wich will swap the current&amp;nbsp;HTMLIFrame element with a HTMLTextarea.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The dependants..&lt;/strong&gt;&lt;br /&gt;The depending object Netxion.Ui.Controls.RichTextEditor -- the richtextbox with fancy toolbar -- was modified to use the Netxion.IEvent methods wich where also implemented on the Netxion.Ui.Controls.RichTextBox.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Addition of delegated tasks</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=172</link><pubDate>4/15/2008 12:45:37 AM</pubDate><guid /><description>
							&lt;p&gt;To run a task witin a given context can be done with the Function.apply method. To save it for later or multiple use we needed to create some classes.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;Executing tasks made easier, two classes where added to the library to supply this functionality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Netxion.Delegate&lt;/strong&gt;&lt;br /&gt;Save a method for execution within a certain context. Due the difference in type of each property the constructor argument order isn't important. If an object type is passed, it will be the context object, if an array is passed it will be set to the arguments property. Once all properties have been set, call the .execute method and it will do an .apply on the function object with the gathered arguments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Netxion.TimedDelegate&lt;/strong&gt;&lt;br /&gt;The Netxion.TimedDelegate&amp;nbsp;is derived from the Netxion.Delegate and adds&amp;nbsp;two new&amp;nbsp;arguments to the constructor, in&amp;nbsp;the case of a Number type it will act as the timeout in milliseconds. Incase of a Boolean type it will indicate whether the .execute method will be called immediately. Further it adds a method .cancel to cancel the operation.&lt;/p&gt;&lt;/p&gt;
						</description></item><item><creator></creator><title>Secure Telnet</title><link>http://ecma262.netxion.net/Weblog/?ArticleId=171</link><pubDate>4/14/2008 4:46:30 PM</pubDate><guid /><description>
							&lt;p&gt;Security option available for the telnet class. Enables us to send data encrypted.&lt;/p&gt;
							&lt;p&gt;&lt;p&gt;Because you'll never know who's&amp;nbsp;patched in..&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key exchange&lt;/strong&gt;&lt;br /&gt;The principle of this security option is a simple key exchange. A random key gets generated clientside wich will be ecnrypted with another randomly generated&amp;nbsp;key. The result will be send to the remote script wich will necrypt the received key with his own generated key and sends it back. The client will decypher the key with his previous generated key and sends it back to the server wich will decypher the key with it's own key. Now client and server have the same key for encryption. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;1. Client generates keys, one for encrypting data the other for encrypting the key&lt;br /&gt;&lt;/strong&gt;client.key = client.generateRandomKey();&lt;br /&gt;client.enc =&amp;nbsp;&amp;nbsp;client.generateRandomKey();&lt;br /&gt;&lt;strong&gt;2. Send the encrypted key to the server&lt;/strong&gt;&lt;br /&gt;client.request(client.rc4(client.key, client.enc));&lt;br /&gt;&lt;strong&gt;3. Server generates one key for encrypting the client key aswell and reponds with the key encrypted&lt;/strong&gt;&lt;br /&gt;server.enc = server.generateRandomKey();&lt;br /&gt;server.key = client.request;&lt;br /&gt;server.response(server.rc4(server.key, server.enc));&lt;br /&gt;&lt;strong&gt;4. Client decrypts the key with it's own local key and sends it back to the server&lt;/strong&gt;&lt;br /&gt;client.request(client.rc4(server.response, client.enc));&lt;br /&gt;&lt;strong&gt;5. Server decrypts the key with it's own local key and&amp;nbsp;having the same encryption key as the client&lt;/strong&gt;&lt;br /&gt;server.key = server.rc4(client.request, server.enc));&lt;/p&gt;&lt;/p&gt;
						</description></item></channel></rss>