<?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:blogger='http://schemas.google.com/blogger/2008' 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-781791689947600216</id><updated>2024-10-25T03:15:11.553+02:00</updated><title type='text'>Sfynx Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-854237368760574117</id><published>2011-11-25T14:40:00.001+01:00</published><updated>2011-11-25T14:42:14.625+01:00</updated><title type='text'>Favorite AS3 Resources</title><content type='html'>Here are some favorite AS3 resources, which contain essentially everything you need to know about AS3. Still, google is the greater search tool, but look out for results from any of those sites. &lt;br /&gt;
&lt;br /&gt;
www.kirupa.com&lt;br /&gt;stackoverflow.com&lt;br /&gt;www.ultrashock.com&lt;br /&gt;www.gotoandlearnforum.com&lt;br /&gt;www.actionscript.org&lt;br /&gt;forums.adobe.com&lt;br /&gt;www.senocular.com&lt;br /&gt;blogs.adobe.com/aharui&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/854237368760574117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/favorite-as3-resources.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/854237368760574117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/854237368760574117'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/favorite-as3-resources.html' title='Favorite AS3 Resources'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-7155840782318166069</id><published>2011-11-11T14:38:00.001+01:00</published><updated>2011-11-11T14:55:33.456+01:00</updated><title type='text'>CSS - Unordered lists with hyphen</title><content type='html'>Formatting unordered lists with hyphens, like:&lt;br /&gt;
- Bullet 1&lt;br /&gt;
- Bullet 2&lt;br /&gt;
&lt;br /&gt;
This can be done manually by removing the default bullet and adding a hyphen sign, and adjusting margins, etc, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ul.hyphen-list {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; list-style-type: none;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; margin-left: 1.5em;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; padding-left: 1em;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; text-indent: -0.85em;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ul.hyphen-list li:before {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; content: &quot;- &quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ul class=&quot;hyphen-list&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;This is line 1&amp;lt;br/&amp;gt;part 2&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;This is line 2&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ul&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For more information, see following resources:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3schools.com/cssref/pr_list-style-type.asp&quot; target=&quot;_blank&quot;&gt;CSS list-style property&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.alistapart.com/articles/taminglists/&quot; target=&quot;_blank&quot;&gt;CSS design: Taming Lists&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
/Sfynx</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/7155840782318166069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/css-unordered-lists-with-hyphen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/7155840782318166069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/7155840782318166069'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/css-unordered-lists-with-hyphen.html' title='CSS - Unordered lists with hyphen'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-2381027732555659503</id><published>2011-11-01T11:13:00.004+01:00</published><updated>2011-11-01T11:15:32.787+01:00</updated><title type='text'>Saving System.DateTime values into MySQL</title><content type='html'>When trying to save a DateTime value in a MySQL database, or loading MySQL date values into a DateTime object, you normally get an exception saying &quot;Unable to convert MySQL date/time to System.DateTime&quot;.&lt;br /&gt;
&lt;br /&gt;
One solution to this problem is to use the mysql connector library for .NET, which can be downloaded from &lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. Using the mysql connector, we can save our DateTime value into a MySqlDateTime datatype and the database will accept this value. Care should be taken if the MySQL date value is 0000-00-00 00:00:00 since this is outside the range of a DateTime object&lt;br /&gt;
&lt;br /&gt;
Another solution is to format the DateTime into a string that MySQL recognizes.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
string sql = &quot;INSERT INTO mytable (text, created) &quot; + &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;VALUES (@text, @created)&quot;;&lt;br /&gt;
string text = &quot;Hello World&quot;;&lt;br /&gt;
DateTime created = DateTime.Now;&lt;br /&gt;
&lt;br /&gt;
MySqlCommand cmd = new MySqlCommand(sql, GetOpenConnection());&lt;br /&gt;
cmd.Parameters.AddWithValue(&quot;@text&quot;, text);&lt;br /&gt;
cmd.Parameters.AddWithValue(&quot;@created&quot;, created.ToString(&quot;yyyy-MM-dd hh:mm:ss&quot;));&lt;/blockquote&gt;
&lt;br /&gt;
This way MySQL accepts the date value.</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/2381027732555659503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/saving-systemdatetime-values-into-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/2381027732555659503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/2381027732555659503'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/11/saving-systemdatetime-values-into-mysql.html' title='Saving System.DateTime values into MySQL'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-6239256181931576290</id><published>2011-10-28T20:02:00.002+02:00</published><updated>2011-10-28T20:02:23.401+02:00</updated><title type='text'>Memory leaks in AS3</title><content type='html'>A short comment on memory leaks in AS3. In many cases, memory leaks are no problems in AS3, since most Flash content is not very complex and swf files are often reloaded (e.g. if they are only part of an html page, such as a banner). In some cases, such as when you create a Flash application or when an entire site is built in Flash or Flex, then memory leaks could build up to very high levels.&lt;br /&gt;
&lt;br /&gt;
In order to monitor memory usage you can call System.totalMemory:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
trace(System.totalMemory);&lt;/blockquote&gt;
&lt;br /&gt;
The most common reason why memory leaks occur is that we add event listeners with strong references to objects, which prevents those objects from being garbage collected. As a best practice to prevent this, you should always use weak references when creating event listeners:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;label.addEventListener(MouseEvent.Click, handleMouseClick, false, 0, true);&lt;/span&gt;&lt;/blockquote&gt;
instead of&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;label.addEventListener(MouseEvent.Click, handleMouseClick);&lt;/span&gt;&lt;/blockquote&gt;
Grant Skinner discusses the importance of &lt;a href=&quot;http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html&quot;&gt;weak references&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html&quot;&gt;resource management&lt;/a&gt; in more detail on his blog.</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/6239256181931576290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/memory-leaks-in-as3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/6239256181931576290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/6239256181931576290'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/memory-leaks-in-as3.html' title='Memory leaks in AS3'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-4601182759498752946</id><published>2011-10-27T15:24:00.000+02:00</published><updated>2011-10-27T15:24:35.166+02:00</updated><title type='text'>Parsing dates in AS3</title><content type='html'>&lt;br /&gt;
Trying to parse dates from strings in AS3 is not always straight forward.&lt;br /&gt;&lt;br /&gt;From today&#39;s lesson we learn that the Date.parse method returns a Number, not and int, and this number can be used to create a Date object using the Date() constructor. However, the Date may not contain any dash &quot;-&quot;, which is commonly used in some local Date formats, since that would produce &quot;Invalid Date&quot;.&lt;br /&gt;&lt;br /&gt;This is how it&#39;s done:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function convertDate(value:String):Date&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; return new Date(Date.parse(value));&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;trace(convertDate(&quot;2011-10-27 15:12:00&quot;)); // OUTPUT: Invalid Date&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;trace(convertDate(&quot;2011 10 27 15:12:00&quot;)); // OUTPUT: Invalid Date&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;trace(convertDate(&quot;2011/10/27 15:12:00&quot;)); // OUTPUT: Thu Oct 27 15:12:00 GMT+0200 2011&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you receive string values using dashes &quot;-&quot;, this can easily be fixed by replacing them with &quot;/&quot;.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;value = value.split(&quot;-&quot;).join(&quot;/&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;Another pitfall is to use an &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;int &lt;/span&gt;instead of a &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Number&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;var date:Date = new Date();&lt;br /&gt;var intValue:int = Date.parse(date);&amp;nbsp;&amp;nbsp;&amp;nbsp; // intValue = 1166693128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (incorrect)&lt;br /&gt;var numValue:Number = Date.parse(date); // numValue = 1319721653000&amp;nbsp;&amp;nbsp; (correct)&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;For more information about accepted date formats and generally about the Date object, see:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#parse%28%29&quot;&gt;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#parse%28%29&lt;/a&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/4601182759498752946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/parsing-dates-in-as3.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/4601182759498752946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/4601182759498752946'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/parsing-dates-in-as3.html' title='Parsing dates in AS3'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-3857176507750438531</id><published>2011-10-26T16:01:00.001+02:00</published><updated>2011-10-26T16:02:47.843+02:00</updated><title type='text'></title><content type='html'>&lt;br /&gt;
&lt;h1&gt;
How to install Mac OS 9 on a iMac with OS X&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
If you, for any reason, want to install Mac OS 9, but do not
have any compatible hardware to install on, then you could use a new Mac and
install OS 9 in
an emulator environment.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
For this purpose we have chosen the SheepShaver emulation
software, which can be downloaded as a binary from Macupdate.com (see http://www.macupdate.com/app/mac/20615/sheepshaver).
Alternatively, you could choose Basilisk II, which is an open source
alternative software.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1&gt;


Prerequisites&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Following our example, you need:&lt;/div&gt;
&lt;ul style=&quot;margin-top: 0cm;&quot; type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;A
     running Mac OS 9 computer&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;Internet
     access&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;A
     target Mac OS X computer&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;An OS
     installation disc for Mac OS 9&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1&gt;


Download SheepShaver Emulator&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Download the SheepShaver (we tried version 2.3) from above
link and extract the content into a new folder. In order to run the SheepShaver
we need to find a suitable Mac OS ROM file, which is not very easy. When found,
the Mac OS ROM file shall be copied into the SheepShaver folder. Until then,
the software will not run.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1&gt;


Finding the Mac OS ROM file&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The Mac OS ROM file is located in the System Folder in an
installed Mac OS 9 or on the system installation disc. We tried different Mac
OS 9 files, from already installed systems and from the system installation
discs and recovery discs. We even tried Mac OS 8 versions, but none of the Mac
OS ROM files were accepted. Also, the Mac OS ROM file would not be available
anywhere on the internet for downloading, since Apple software license does not
allow any distribution of the file.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;However, there is a
workaround, and it worked for us!&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
You can download a Mac OS ROM Update, following the
instructions from the SheepShaver help, located at: &lt;a href=&quot;http://www.open.ou.nl/hsp/Engels/SheepShaver_Help/rom_file_how_to.html&quot;&gt;http://www.open.ou.nl/hsp/Engels/SheepShaver_Help/rom_file_how_to.html&lt;/a&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Step 1. Download the
Mac OS ROM Update 1.0.smi.bin.&lt;/b&gt; The file is located at Apple’s website: &lt;a href=&quot;http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/MultiCountry/Macintosh/System/Mac_OS_ROM/Mac_OS_ROM_Update_1.0.smi.bin&quot;&gt;http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/MultiCountry/Macintosh/System/Mac_OS_ROM/Mac_OS_ROM_Update_1.0.smi.bin&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Make sure you download the file on a running Mac OS 9, since
you need to mount the smi-file (self-mounting image) and doing it on Mac OS X
in our case converted the files to PC-files, and extracting the Mac OS ROM
failed.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Step 2. Mounting the
Mac OS ROM Update image&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After downloading the Update smi, double click on it to
extract the Mac OS ROM Update 1.0.smi file. You can double click on the new
file to mount the image, after which it will appear on the desktop as an image
called Mac OS ROM Update.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Step 3. Download the
TomeViewer.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
TomeViewer is a software for Mac OS 9 which is used to
extract files from installation packages, called Tome archive. TomeViewer can
be downloaded from Tucows here: &lt;a href=&quot;http://www.tucows.com/preview/207002&quot;&gt;http://www.tucows.com/preview/207002&lt;/a&gt;.
We tried version 1.3d3, which worked fine.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The TomeViewer comes as a StuffIt (.sit) file, which can be
extracted by doubleclicking.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Step 4. Extracting
the Mac OS ROM file&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Run the TomeViewer application and open the mounted image on
the desktop from the File menu. A window will be opened and the Mac OS ROM file
will appear. From the Archive menu, you can choose Expand to extract the file
to a location of your choice. Then copy this file to the Mac OS X computer to
the SheepShaver folder.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The file that worked for us is 1,945,746 bytes.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Step 5. Setting up
the virtual Mac OS 9 computer&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The first step when running the SheepShaver emulator is to set
up a harddrive, memory, etc. All this is well described in the Setup
Documentation, so we will not cover it here.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
When the emulated computer first boots, then it will not
find any harddrive, but you can access the preferences on the menu. Using the
dialog you can set up the harddrive and all other hardware settings. &lt;b&gt;In order to close the program you need to
press ctrl + escape.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now insert the OS installation disc and start SheepShaver
emulator. The emulator will boot using the OS disc and you can format the
harddrive (&lt;b&gt;choose extended file system&lt;/b&gt;)
and install the operating system. In case you have a hardware specific OS installation
disc you need to extract the OS files manually.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Insert a system restore disc and locate the OS image file in
the configuration folder. Double click on the image file to extract the files
to the desktop. Now copy the files to your newly formatted harddrive and the
Mac OS 9 should be up and running.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Restart the Mac OS 9 and eject the installation disc, and
you are hopefully done!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/3857176507750438531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/normal-0-21-false-false-false.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/3857176507750438531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/3857176507750438531'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/normal-0-21-false-false-false.html' title=''/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-6798342005068115993</id><published>2011-10-25T15:42:00.001+02:00</published><updated>2011-10-25T15:42:47.707+02:00</updated><title type='text'>Downloading and parsing external content through Javascript and VBScript</title><content type='html'>In this first post we share a method to download and parse a remote http page using the XMLHttpRequest object available in Javascript.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Background&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;If you want to get some information from a different web site, you could let the browser download that page and then parse it for the desired content.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Suggested procedure&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
1. Create an XMLHttpRequest object using a browser independent method.&lt;br /&gt;2. Remove or replace all html tags that could cause the browser to run scripts, load external content, or behave in any unwanted way.&lt;br /&gt;3. Request the target page and insert the returned content in a hidded iframe&lt;br /&gt;4. Parse the iframe DOM and look for wanted content.&lt;br /&gt;5. Process and reformat the extracted content.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;1. Creating the XMLHttpRequest object&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The following javascript function first tries to create the object for Internet Explorer using conditional compiling (See http://www.javascriptkit.com/javatutors/conditionalcompile.shtml).&lt;br /&gt;If above does not work and XMLHttpRequest class (see http://www.w3schools.com/xml/xml_http.asp) is defined, then that will be used.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function createXmlHttp() {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var xmlhttp=false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*@cc_on @*/&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*@if (@_jscript_version &amp;gt;= 5)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Through conditional compilation we can handle old Internet Explorer versions&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // and security blocked creation of the XMLHTTP object.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (e) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (E) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp = false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @end @*/&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!xmlhttp &amp;amp;&amp;amp; typeof XMLHttpRequest!=&#39;undefined&#39;) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp = new XMLHttpRequest();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (e) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp=false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!xmlhttp &amp;amp;&amp;amp; window.createRequest) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp = window.createRequest();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (e) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlhttp=false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return xmlhttp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;2. Making content safe&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Since we are going to insert the code in a hidden iframe, we don&#39;t want the browser to load any scripts or other active content.&lt;br /&gt;Since VBScript is very easy to use for string manipulation (RegEx could be used, but is less straight forward), we could create a VBScript Function to do the work for us.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script language=&quot;vbscript&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Function Safe(txt)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim tags&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;link&quot;, &quot;&amp;lt;safelink&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;/link&amp;gt;&quot;, &quot;&amp;lt;/safelink&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;script&quot;, &quot;&amp;lt;safescript&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;/scr&quot; &amp;amp; &quot;ipt&amp;gt;&quot;, &quot;&amp;lt;/safescript&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;iframe&quot;, &quot;&amp;lt;safeframe&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;/iframe&amp;gt;&quot;, &quot;&amp;lt;/safeframe&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;img&quot;, &quot;&amp;lt;safeimg&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txt = Replace(txt, &quot;&amp;lt;/img&amp;gt;&quot;, &quot;&amp;lt;/safeimg&amp;gt;&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Safe = txt&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;This way any &amp;lt;script&amp;gt; tag will be renamed to &amp;lt;safescript&amp;gt; and therefore it will not behave like an ordinary script tag.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;3. Request the target page&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This part is quite straight forward. For more information see http://www.w3schools.com/xml/xml_http.asp.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xmlhttp = createXmlHttp();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xmlhttp.open(&quot;GET&quot;, url, true);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xmlhttp.onreadystatechange = handleHttpResult;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xmlhttp.send(null);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function handleHttpResult() {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (xmlhttp.readyState == 4) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parseResponse(xmlhttp.responseText);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;4. Parsing the IFRAME DOM&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First it is convenient to have two helper functions, function $() and function $$() to retrieve DOM objects, either from the main document DOM or from the IFRAME DOM.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;function $(id) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return document.getElementById(id);&lt;br /&gt;}&lt;br /&gt;function $$(id) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return loadedDoc.getElementById(id);&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function parseResponse(txt) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; txt = safe(txt); // make the content safe according to above&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedDoc = $(&quot;iframe&quot;).contentWindow.document;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedDoc.close();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedDoc.write(&quot; &quot;); // clear iframe document&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedDoc.writeln(txt); // insert content into iframe document&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Below an example of parsing. This of course needs to be adapted to every context.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($$(&quot;interesting-content-tag&quot;) == null)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;NO RESULT FOUND&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var list = $$(&quot;interesting-content-tag&quot;).childNodes;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tag;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; list.length - 1; i++)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (list[i].getElementsByTagName(&quot;p&quot;)[0].className == &quot;title&quot;) // if current tag contains a tag &amp;lt;p class=&quot;title&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tag = list[i].getElementsByTagName(&quot;ul&quot;)[0].childNodes[0]; // then retrieve the first &amp;lt;li&amp;gt; child of the first &amp;lt;ul&amp;gt; tag.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;Found tag: &quot; + tag.innerHTML);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // alert the user.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (tag == null) alert(&quot;No tag found&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/6798342005068115993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/downloading-and-parsing-external.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/6798342005068115993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/6798342005068115993'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/downloading-and-parsing-external.html' title='Downloading and parsing external content through Javascript and VBScript'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-781791689947600216.post-1524964473104320223</id><published>2011-10-25T14:55:00.000+02:00</published><updated>2011-10-25T14:55:49.682+02:00</updated><title type='text'>Blog started</title><content type='html'>In this blog we will comment on topics related to our main business, with main focus on programming concepts.&lt;br /&gt;
&lt;br /&gt;
/Sfynx Team</content><link rel='replies' type='application/atom+xml' href='http://sfynxnetworks.blogspot.com/feeds/1524964473104320223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/blog-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/1524964473104320223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/781791689947600216/posts/default/1524964473104320223'/><link rel='alternate' type='text/html' href='http://sfynxnetworks.blogspot.com/2011/10/blog-started.html' title='Blog started'/><author><name>Sfynx</name><uri>http://www.blogger.com/profile/16563202685715246235</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>