<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
	<title>formVista Development Blog</title><link>http://formvista.com:80/web-and-ajax-development</link><description></description><language>en-us</language><pubDate>Fri, 27 Nov 2009 19:38:04 EST</pubDate><lastBuildDate>Mon, 02 Nov 2009 22:02:01 EST</lastBuildDate><docs>http://blogs.law.harvard.edu/tech/rss</docs><generator>formVista::iCMS BLOG</generator><item><title>window.location.href failing under MSIE 6</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=94</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=94#comments</comments><description>&lt;p&gt;So I had a function:&lt;/p&gt;   &lt;blockquote&gt;     &lt;p&gt;function fv_loadUrl( parms )&lt;br /&gt;{&lt;br /&gt;var elem = parms.elem;&lt;br /&gt;var href = parms.href;&lt;br /&gt;window.location.href = href;&lt;br /&gt;return true; &lt;br /&gt;}&lt;/p&gt;   &lt;/blockquote&gt;   &lt;p&gt;Works like a champ in FireFox, but not in MSIE 6. I read a post that speculated the script was terminating before the page could load. Changing the &lt;em&gt;&lt;strong&gt;return true;&lt;/strong&gt;&lt;/em&gt; to &lt;em&gt;&lt;strong&gt;return false;&lt;/strong&gt;&lt;/em&gt; solved the problem.&lt;br /&gt;&lt;/p&gt;   &lt;blockquote&gt;     &lt;p&gt;&lt;br /&gt;&lt;/p&gt;   &lt;/blockquote&gt;</description><pubDate>Mon, 02 Nov 2009 22:02:01 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=94</guid></item><item><title>Javascript Closures</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=90</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=90#comments</comments><description>&lt;p&gt; A technical article on &lt;a href=&quot;http://www.jibbering.com/faq/faq_notes/closures.html&quot; target=&quot;_blank&quot;&gt;Javascript Closures&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt; And an article describing an approach to dealing with &lt;a target=&quot;_blank&quot; href=&quot;http://laurens.vd.oever.nl/weblog/items2005/closures/&quot;&gt;closure memory leaks&lt;/a&gt;.&lt;/p&gt;   &lt;p&gt;And an article describing a tool to &lt;a href=&quot;http://www.smallworkarounds.net/2009/04/jquery-leaking-memory-be-careful-while.html&quot;&gt;track down memory leaks in MSIE&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;</description><pubDate>Tue, 20 Oct 2009 18:11:33 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=90</guid></item><item><title>A Firefox, Web Developer or FireBug bug</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=89</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=89#comments</comments><description>&lt;p&gt;This has represented a few hours of my life. At the present moment I don't know if the bug lies in firefox, the web developer extension or the firebug extension.&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;I'm using Firefox 3.0.13 under Kubuntu Linux (9.04) with the Web Developer extension v.  1.1.8 and the FireBug extension v. 1.4.3.&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;Consider the following small HTML page:&lt;/p&gt;    &lt;blockquote&gt;&lt;font size=&quot;2&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;FireFox a name ul bug&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a name=&quot;comments&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ul id=&quot;comments_list&quot;&amp;gt;&lt;br /&gt;        &amp;lt;li&amp;gt;&lt;br /&gt;                &amp;lt;div&amp;gt;&lt;br /&gt;                        &amp;lt;a href=&quot;void&quot; &amp;gt;TEST&amp;lt;/a&amp;gt;&lt;br /&gt;                &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/blockquote&gt;    &lt;p&gt;Using the &lt;a target=&quot;_blank&quot;&gt;http://validator.w3.org &lt;/a&gt;it validates.&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;Opening the page in firefox and viewing the source yields the HTML above, as one would expect. What threw me for quote some time however is that if you do a &quot;select all&quot; on the page and right click -&amp;gt; view selection source you get:&lt;/p&gt;   &lt;pre&gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; xmlns&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;http://www.w3.org/1999/xhtml&quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;head&lt;/span&gt;&amp;gt;   &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;title&lt;/span&gt;&amp;gt;FireFox a name ul bug&amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;title&lt;/span&gt;&amp;gt; &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;meta&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; http-equiv&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;Content-Type&quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;content&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;text/html; charset=iso-8859-1&quot;&lt;/span&gt;&amp;gt; &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;body&lt;/span&gt;&amp;gt;  &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; name&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;comments&quot;&lt;/span&gt;&amp;gt;  &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; id&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;comments_list&quot;&lt;/span&gt;&amp;gt; &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; name&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;comments&quot;&lt;/span&gt;&amp;gt; &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;li&lt;/span&gt;&amp;gt; &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; name&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;comments&quot;&lt;/span&gt;&amp;gt;  &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;div&lt;/span&gt;&amp;gt; &amp;lt;&lt;span class=&quot;start-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; name&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;comments&quot;&lt;/span&gt;&amp;gt;   &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; href&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;void&quot;&lt;/span&gt;&amp;gt;TEST&amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;a&lt;/span&gt;&amp;gt; &lt;/pre&gt;   &lt;pre&gt;  &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;div&lt;/span&gt;&amp;gt;   &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;li&lt;/span&gt;&amp;gt; &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;ul&lt;/span&gt;&amp;gt;  &amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;body&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class=&quot;end-tag&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/pre&gt;   &lt;p&gt; &lt;/p&gt;    &lt;blockquote&gt;      &lt;pre&gt;&lt;/pre&gt;      &lt;pre&gt;&lt;/pre&gt;    &lt;/blockquote&gt;    &lt;blockquote&gt;      &lt;p&gt; &lt;/p&gt;    &lt;/blockquote&gt;    &lt;p&gt;As you can see there are now three erroneous &lt;em&gt;&lt;strong&gt;&amp;lt;a name=&quot;comments&quot;&amp;gt;&lt;/strong&gt;&lt;/em&gt; interspersed between various tags. The same behavior happens under FireBug if you inspect the element. &lt;/p&gt;    &lt;p&gt;If you change the &lt;em&gt;&lt;strong&gt;&amp;lt;a name=&quot;comments&quot;/&amp;gt;&lt;/strong&gt;&lt;/em&gt; to &lt;em&gt;&lt;strong&gt;&amp;lt;a name=&quot;comments&quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;/strong&gt;&lt;/em&gt; and repeat the select all view selection source experiment it yields:&lt;/p&gt;    &lt;p&gt;Which is correct. Since the page validates using the &lt;em&gt;&lt;strong&gt;&amp;lt;a name=&quot;foo&quot; /&amp;gt;&lt;/strong&gt;&lt;/em&gt; notation, it seems to me it should not trash the DOM.  &lt;/p&gt;    &lt;p&gt;To see the bug in action, &lt;a href=&quot;/formvista/site_local/uploaded_html/aname_firefox_bug.html&quot; target=&quot;_blank&quot;&gt;here's a test page. &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;At the present moment, my formVista blogging software does not support anonymous comments. If you would like to comment on this article please register for an account using the register link in the upper left corner.&lt;/p&gt;    &lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><pubDate>Mon, 19 Oct 2009 18:09:29 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=89</guid></item><item><title>PHP split() is listed as deprecated and will be removed</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=88</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=88#comments</comments><description>&lt;p&gt;This is one of the liabilities of using a language long term that's in a high state of flux. As you continue to build larger and larger codebases, the work required to change that codebase as the language changes increases linearly.&lt;/p&gt;   &lt;p&gt;The formVista codebase started in 2001 and has been growing ever since. During that time the PHP language has changed significantly. In many of these cases these changes address fundamental design flaws in the language such as the whole way objects were done in PHP 4. (A change which will in the near future force me to evaluate each and every object assignment in the entire codebase. ouch.)&lt;/p&gt;   &lt;p&gt;So today I was looking at the PHP documentation for the split(). I'm endless forgetting if the string or the delimiter comes first. To my shock and horror &lt;a href=&quot;http://us3.php.net/manual/en/function.split.php&quot; target=&quot;_blank&quot;&gt;split() is now deprecated&lt;/a&gt;.&lt;/p&gt;   &lt;p&gt;Of course you can use &lt;a href=&quot;http://us3.php.net/manual/en/function.explode.php&quot; target=&quot;_blank&quot;&gt;explode()&lt;/a&gt; or &lt;a href=&quot;http://us3.php.net/manual/en/function.preg-split.php&quot; target=&quot;_blank&quot;&gt;preg_split()&lt;/a&gt;, but it's another case of having to crawl through a codebase and change things. IMHO, in this case it's completely needless and arbitrary. If the underlying code that implements the split() function needs to be changed, then a wrapper function should be included so that legacy code does not break. &lt;/p&gt;   &lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><pubDate>Sun, 18 Oct 2009 15:51:41 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=88</guid></item><item><title>A Gotcha when using FireBug with Legacy HTML</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=87</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=87#comments</comments><description>&lt;p&gt;&lt;a href=&quot;http://getfirebug.com/&quot; target=&quot;_blank&quot;&gt;Firebug&lt;/a&gt; absolutely rocks. When tracking down the effects of errant CSS cascades, html quirks, DHTML side effects, etc, nothing beats Firebug. &lt;/p&gt;   &lt;p&gt;However, today I ran into a little gotcha that consumed a few hours of my life. I wanted to align some drop downs and input fields nicely for the admin side of a new microblogging twitter/facebook/digg type component for formVista. &lt;/p&gt;   &lt;p&gt;The backend of formVista has a bunch of legacy code. Parts of it were written close to 10 years ago. Slowly as we develop out the new moderinzed FVML tag set, we're going through and updated the very dated looking backend components. &lt;/p&gt;   &lt;p&gt;I figured it was some style that was cascading down. Some margin, padding or alignment. Firebug showed nothing. I edited the styles inline. No joy. No matter what styles I applied the form fields displayed in the center of the form. I started to believe maybe I had run into a CSS bug in Firefox. &lt;/p&gt;   &lt;p&gt;Then I realized the culprit. In formVista, components are hosted on pages but are completely separate. As a result, I don't spent alot of time actually looking at the HTML pages themselves. I focus on the component FVML files where all the work happens. The hosting HTML pages are just wrappers.&lt;/p&gt;   &lt;p&gt; Legacy wrappers.&lt;/p&gt;   &lt;p&gt;The page in question, where my newly styled component was living, used an ancient table based layout.&lt;/p&gt;   &lt;p&gt;&lt;em&gt;&lt;strong&gt;&amp;lt;table width=&quot;100%&quot;&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td valign=&quot;top&quot; align=&quot;center&quot;&amp;gt;&lt;br /&gt;...etc...&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;   &lt;p&gt;And therein lies the problem. The align=&quot;center&quot; was cascading down and overriding my styling. My guess is that firebug doesn't have a way to handle this case, or that I'm missing something in it's use. &lt;/p&gt;   &lt;p&gt;Re-arrange the hosting page to use a CSS layout and problem solved. &lt;/p&gt;</description><pubDate>Tue, 13 Oct 2009 17:55:41 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=87</guid></item><item><title>An Overview of the jQuery CSS Framework</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=86</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=86#comments</comments><description>&lt;p&gt;In case you're like me an missed this document, here's a link to the jQuery CSS Framework documentation:&lt;/p&gt;   &lt;p&gt;&lt;a href=&quot;http://jqueryui.com/docs/Theming/API&quot; target=&quot;_blank&quot;&gt;http://jqueryui.com/docs/Theming/API&lt;/a&gt;&lt;/p&gt;   &lt;p&gt; &lt;br /&gt;&lt;/p&gt;</description><pubDate>Sat, 10 Oct 2009 14:39:57 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=86</guid></item><item><title>jQuery UI CSS scopes</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=85</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=85#comments</comments><description>&lt;p&gt;In the previous version of formVista we had a single jQuery UI installation with a &lt;a target=&quot;_blank&quot; href=&quot;http://jqueryui.com/themeroller/&quot;&gt;theme roller&lt;/a&gt; created theme. &lt;/p&gt;    &lt;p&gt;Then for each formVista theme we would override key parts of the themeroller theme. This has turned out to be a painful approach. So instead, I'm moving to a setup where we use themeroller to create a full jQuery theme for each formVista theme. It should end up being more maintainable. Time will tell.&lt;/p&gt;    &lt;p&gt;As part of this effort and to avoid some unfortunate interactions between jQuery.UI styles and styles from other components, which in formVista are all dynamically loaded, I decided to try applying a CSS scope (i.e. prefix) to the themeroller generated theme.&lt;/p&gt;    &lt;p&gt;This works fairly well except in the case of dialogs and other popup tags that are direct descendants of the &amp;lt;body&amp;gt; tag. In order to apply the CSS Scope to the dialog, you have to wrap the dialog in a div containing your scope. As mentioned in &lt;a target=&quot;_blank&quot; href=&quot;http://www.filamentgroup.com/lab/using_multiple_jquery_ui_themes_on_a_single_page/&quot;&gt;this blog article&lt;/a&gt; over the filament group, you can use:&lt;/p&gt;    &lt;blockquote&gt;      &lt;p&gt;&lt;em&gt;$(.selector).dialog().parents(.ui-dialog:eq(0)).wrap(&amp;lt;div class=&quot;myScope&quot;&amp;gt;&amp;lt;/div&amp;gt;); &lt;/em&gt;&lt;/p&gt;    &lt;/blockquote&gt;    &lt;p&gt;to wrap the dialog. &lt;/p&gt;    &lt;p&gt; The one problem with this approach is that if you happen to be creating a modal dialog, a separate div implementing the modal behavior is created /outside/ of the wrapping div which means it does not get the CSS scope style.&lt;/p&gt;    &lt;p&gt;I'm still working on a solution to this issue. &lt;/p&gt;    &lt;p&gt; My understanding is that jQuery will have a &quot;helperClass&quot; attribute at some point in the future to address this issue. Until then, I'll have to implement some hack or continue on just using a global style.&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Update 2009-09-10&lt;/strong&gt;&lt;/p&gt;   &lt;p&gt;I've decided to fall back and punt on the CSS Scope issue for now.&lt;br /&gt;&lt;/p&gt;</description><pubDate>Fri, 09 Oct 2009 20:25:30 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=85</guid></item><item><title>Another Javascript RIch User Interface library to watch - ExtJS</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=83</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=83#comments</comments><description>&lt;p&gt;An article over at &lt;a href=&quot;http://books.slashdot.org/story/09/09/28/1425228/Learning-Ext-JS?art_pos=1&quot; target=&quot;_blank&quot;&gt;slashdot.org&lt;/a&gt; referred to a commercial/open source rich user interface library called ExtJS available at: &lt;a href=&quot;http://www.extjs.com/&quot; target=&quot;_blank&quot;&gt;http://www.extjs.com/.&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;As of this writing it is dual licensed under the GPL and a Commercial License, similar to the way formVista is licensed. &lt;/p&gt;   &lt;p&gt;After a cursory glance it seems like a fairly complete toolkit, but at this point I'm committed to continuing on with &lt;a href=&quot;http://www.jquery.com&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt; for formVista.&lt;br /&gt;&lt;/p&gt;</description><pubDate>Mon, 05 Oct 2009 15:31:15 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=83</guid></item><item><title>Xinha WYSIWYG HTMLEditor in jQuery.UI tabs</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=82</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=82#comments</comments><description>&lt;p&gt;More complex AJAX/AJSON applications such as Google Maps and the &lt;a target=&quot;_blank&quot; href=&quot;http://www.xinha.org&quot;&gt;Xinha WYSIWYG HTML Editor&lt;/a&gt; do not render correctly when placed into hidden divs, presumably because they cannot correctly get the size of the div. &lt;/p&gt;    &lt;p&gt;According to the &lt;a target=&quot;_blank&quot; href=&quot;http://trac.xinha.org/ticket/858&quot;&gt;Xinha ticket list&lt;/a&gt;, the editor must be visible before it is created otherwise it will be displayed in a broken and frozen state.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Problem #1: MSIE 6 Xinha in hidden div when size is set to &lt;em&gt;auto&lt;/em&gt;&lt;/strong&gt; &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;This can be reproduced by placing the Xinha editor into an unselected tab in a jQuery.UI tab control:&lt;/p&gt;    &lt;p&gt; &lt;/p&gt;    &lt;p&gt;&lt;img height=&quot;363&quot; width=&quot;640&quot; alt=&quot;addsku_xinha2.jpg&quot; src=&quot;/formvista/site_local/user_files/public/931/graphics/addsku_xinha2.jpg&quot; /&gt;&lt;br /&gt;&lt;/p&gt;    &lt;p&gt; &lt;/p&gt;    &lt;p align=&quot;center&quot;&gt; &lt;/p&gt;    &lt;p&gt;The editor does not size itself correctly to the surrounding div. In addition the editor is frozen. &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Problem #2: MSIE 6.0 Form Element Rendering glitch&lt;/strong&gt; &lt;br /&gt;&lt;/p&gt;    &lt;p align=&quot;left&quot;&gt;The jQuery.UI documentation offers a solution/workaround described as the &lt;a target=&quot;_blank&quot; href=&quot;http://docs.jquery.com/UI/Tabs#...my_slider.2C_Google_Map.2C_sIFR_etc._not_work_when_placed_in_a_hidden_.28inactive.29_tab.3F&quot;&gt;oft-left technique&lt;/a&gt; which involves moving divs off the visible page instead of setting it to &lt;em&gt;display: none;&lt;/em&gt;. Unfortunately under MSIE 6 this approach seems to break when used with something that contains form elements:&lt;/p&gt;    &lt;p align=&quot;center&quot;&gt;&lt;img height=&quot;201&quot; width=&quot;637&quot; style=&quot;border-style:solid;border-width:0px;margin:10px;&quot; alt=&quot;addsku_xinha.jpg&quot; src=&quot;/formvista/site_local/user_files/public/931/graphics/addsku_xinha.jpg&quot; /&gt; &lt;/p&gt;    &lt;p align=&quot;left&quot;&gt; This occurs after the Description tab containing Xinha has been selected and unselected. The other downside to the &lt;em&gt;off-left technique&lt;/em&gt; is that it can confuse screen readers. &lt;br /&gt;&lt;/p&gt;    &lt;div align=&quot;left&quot;&gt;      &lt;p&gt;&lt;strong&gt;A Work-Around &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;      &lt;p&gt;Given that it was clearly a sizing problem, I discovered that if you create the Xinha editor using &lt;strong&gt;fixed sizing &lt;/strong&gt;the first problem is solved.This is done by setting the width and height properties of the XinhaConfig object before creating the editor:&lt;/p&gt;      &lt;blockquote&gt;        &lt;p&gt;var xinha_config = new Xinha.Config();&lt;br /&gt;xinha_config.width = &quot;700px&quot;;&lt;br /&gt;xinha_config.height = &quot;300px&quot;;&lt;/p&gt;      &lt;/blockquote&gt;      &lt;p&gt;This solves the first problem. &lt;/p&gt;      &lt;p&gt;The second problem, namely that the editor is frozen, can be solved by noticing that the Xinha method &lt;strong&gt;sizeEditor()&lt;/strong&gt; can called without any arguments. Called in this fasion it recalculates its size based on how it was originally configured. This only seems to work if the editor has fixed sizing.&lt;/p&gt;      &lt;p&gt;So whenever the tab is shown, just call resize. This can be easily accomplished by binding a callback to the tabshow event:&lt;/p&gt;      &lt;p&gt; &lt;/p&gt;      &lt;blockquote&gt; $('#tabs').bind('tabsshow', &lt;br /&gt;   function( event, ui )&lt;br /&gt;      { &lt;br /&gt;      if ( ui.index == 1 )&lt;br /&gt;         {&lt;br /&gt;         editor.sizeEditor();&lt;br /&gt;         }&lt;br /&gt;      } );&lt;br /&gt;&lt;/blockquote&gt;      &lt;p&gt;Assuming you have a global editor object avialable. I like to avoid globals whenever possible so, in formVista, when I process the &amp;lt;htmleditor&amp;gt; FVML tag, I add the editor object to the textarea using the jQuery core data() method as in:&lt;/p&gt;      &lt;blockquote&gt;        &lt;p&gt;$('form[name=someform] textarea[name=somefield]').data( &quot;xinha_editors&quot;, Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins));&lt;br /&gt;&lt;/p&gt;      &lt;/blockquote&gt;    &lt;/div&gt;    &lt;p align=&quot;left&quot;&gt;And then in my callback I just get the editor using:&lt;/p&gt;    &lt;blockquote&gt;      &lt;p align=&quot;left&quot;&gt;var editor = $('form[name=someform] textarea[name=somefield]').data( &quot;xinha_editors&quot; )['somefield'];&lt;/p&gt;    &lt;/blockquote&gt;    &lt;p align=&quot;left&quot;&gt;Note that the value stored in the xinha_editors entry is an array of editors per instructions in the &lt;a target=&quot;_blank&quot; href=&quot;http://trac.xinha.org/wiki/NewbieGuide&quot;&gt;Xinha newbie guide&lt;/a&gt;. You can certainly do it differently.&lt;/p&gt;    &lt;p&gt;Right now, the FVML &amp;lt;htmleditor&amp;gt; tag is not yet smart enough to know that it's inside a &amp;lt;tabbedcontainer&amp;gt; tag, so I just embed the callback into the FVML using a plain &amp;lt;js&amp;gt; tag. More on doing development in FVML another time. &lt;br /&gt;&lt;/p&gt;     &lt;p&gt;&lt;strong&gt;Conclusion &lt;/strong&gt;&lt;/p&gt;   &lt;p&gt;This workaround seems to work in FireFox, MSIE 6, and MSIE 8. I have not yet had a chance to try it in other browsers.&lt;/p&gt;    &lt;p align=&quot;left&quot;&gt;So in summary, to get the Xinha WYSIWYG HTML Editor to work with the jQuery UI tab control in an unselected tab:&lt;/p&gt;    &lt;ol&gt;      &lt;li&gt;configure Xinha using a fixed size&lt;/li&gt;      &lt;li&gt;call sizeEditor() when the tab containing the htmleditor is selected.&lt;/li&gt;    &lt;/ol&gt;   &lt;p&gt; &lt;/p&gt;   &lt;p&gt;If you find any problems with this workaround or have any questions, please leave comments here or in the forum. (Unfortunately, I don't have anonymous posting built yet, so you'll need to register for an account. See the Register link in the upper right corner.)&lt;br /&gt;&lt;/p&gt;</description><pubDate>Sat, 03 Oct 2009 15:17:27 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=82</guid></item><item><title>From a follower on twitter - net-tuts</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=81</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=81#comments</comments><description>What appears to be a compelling resource for javascript, jQuery, HTML, PHP and CSS info: &lt;a href=&quot;http://net.tutsplus.com/&quot; target=&quot;_blank&quot;&gt;http://net.tutsplus.com/&lt;/a&gt;</description><pubDate>Tue, 29 Sep 2009 11:25:57 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=81</guid></item><item><title>HTML5 &amp;lt;canvas&amp;gt; tag</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=80</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=80#comments</comments><description>&lt;p&gt;Yesterday I came across a few demonstrations of what's possible using the HTML5 &amp;lt;canvas&amp;gt; tag which opens up some very interesting possibilities.&lt;/p&gt;   &lt;p&gt;According to Wikipedia -&lt;a href=&quot;http://en.wikipedia.org/wiki/Canvas_(HTML_element)&quot; target=&quot;_blank&quot;&gt; http://en.wikipedia.org/wiki/Canvas_(HTML_element) &lt;/a&gt;&lt;/p&gt;   &lt;p&gt;Some examples of what can be done with the canvas tag:&lt;/p&gt;   &lt;p&gt;&lt;a href=&quot;http://blobsallad.se/&quot; target=&quot;_blank&quot;&gt;Blob Salad&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;&lt;a href=&quot;http://hyper-metrix.com/#Burst&quot; target=&quot;_blank&quot;&gt;http://hyper-metrix.com/#Burst&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;     &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://balldroppings.com/js/&quot; target=&quot;_blank&quot;&gt;http://balldroppings.com/js/&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;   </description><pubDate>Tue, 29 Sep 2009 11:13:11 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=80</guid></item><item><title>The Xinha WYSIWYG Editor, HTMLPurifier and the non-validating br tags.</title><author>no_author@no_author.com</author><dc:creator>Yermo</dc:creator><link>http://formvista.com:80/web-and-ajax-development?article_id=77</link><comments>http://formvista.com:80/web-and-ajax-development?article_id=77#comments</comments><description>&lt;p&gt;So I just spent some time tracking down a little bug which turned out to be my own stupid fault. &lt;/p&gt;    &lt;p&gt;formVista uses &lt;a href=&quot;http://www.htmlpurifier.org/&quot; target=&quot;_blank&quot;&gt;HTMLPurifier&lt;/a&gt; to sanitize HTML that's submitted by end users. HTMLPurifier rocks.  &lt;/p&gt;    &lt;p&gt;However, Ryan over at &lt;a href=&quot;http://www.nbinteractive.com/&quot; target=&quot;_blank&quot;&gt;Nuts and Bolts Interactive&lt;/a&gt; discovered &amp;lt;br /&amp;gt; tags submitted using the WYSIWYG html editor are changed to &amp;lt;br&amp;gt;. This is not correct for the &lt;em&gt;&lt;span class=&quot;doctype&quot;&gt;XHTML 1.0 Transitional&lt;/span&gt;&lt;/em&gt; doctype that we're using on the front end.&lt;br /&gt;&lt;/p&gt;    &lt;p&gt;After some digging, I realized that I had set the doctype correctly on the frontend but had set it to &lt;em&gt;HTML 4.01 Transitional &lt;/em&gt;on the backend. (We still have a lot of work to do bringing the backend out of the stone-age). &lt;/p&gt;    &lt;p&gt;Since HTMLPurifier was being loaded on the &lt;em&gt;backend&lt;/em&gt; it was getting the backend's doctype and doing exactly what it was supposed to do.&lt;/p&gt; So the takeway is, if HTMLPurifier is not doing what you expect it to be doing, make sure to check that you are in fact passing it the correct doctype.</description><pubDate>Wed, 23 Sep 2009 13:41:56 EST</pubDate><guid>http://formvista.com:80/web-and-ajax-development?article_id=77</guid></item>
	</channel>
</rss>