<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>bencoffman.com/blog - IE8</title>
    <link>http://bencoffman.com/blog/</link>
    <description>News about Tech and a few other things.</description>
    <language>en-us</language>
    <copyright>Ben Coffman</copyright>
    <lastBuildDate>Tue, 28 Sep 2010 04:33:09 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>coffmanben@gmail.com</managingEditor>
    <webMaster>coffmanben@gmail.com</webMaster>
    <item>
      <trackback:ping>http://bencoffman.com/blog/Trackback.aspx?guid=8c356591-fea9-4fb9-a67c-c2b5cb16b2d3</trackback:ping>
      <pingback:server>http://bencoffman.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://bencoffman.com/blog/PermaLink,guid,8c356591-fea9-4fb9-a67c-c2b5cb16b2d3.aspx</pingback:target>
      <dc:creator>Ben Coffman</dc:creator>
      <wfw:comment>http://bencoffman.com/blog/CommentView,guid,8c356591-fea9-4fb9-a67c-c2b5cb16b2d3.aspx</wfw:comment>
      <wfw:commentRss>http://bencoffman.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8c356591-fea9-4fb9-a67c-c2b5cb16b2d3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/dojo-logo.png" border="0" />
        <br />
        <br />
        <br />
Here I am busting my ass fixing code, again :). A few weeks ago I knew nothing about
Dojo now I feel I know more than the person that wrote the code I was debugging. It's
hard stuff to look at code see what the programmer is <i>trying</i> to do and fix
their code so it does what they <i>intended</i> it to do. As I mentioned in an earlier
post, while it is frusterating (to me at least) I do believe debugging some else's
code is the <b>best</b> way to learn. It helps that my guy knew what he was doing,
so his bugs are not easy and he provides some good code inspiration on what he was
trying to attempt. 
<br /><br />
On to the point. The website we were working on utilizes a dijit <i>(a dijit is pre-built
Dojo functionality like a javascript calendar or javascript accordion that you can
use on your website by just plugging in a few key parameters to be off and running)</i> accordion
widget. It was displaying incorrectly in IE8. Turns out the problem was a combination
of several things one of which he was trying to embed html in the title attribute
of the accordion pane. Dojo uses the title attribute to make the header of one division
of the accordion. This accordion header is where the user clicks to display the text
associated with that header.<br /><br />
The mistake was to embed the html in the title attribute. What I came to learn was
dijit provides a wonderful <i>themes</i> folder in it is a dijit.css class file which
allows you to decorate with CSS all the widgets Dojo makes. After I removed all his
markup from the title attribute for the accordion and removed a "display:block" from
the special dijit.css file in the themes folder, the accordion works as intended in
IE8.<br /><br />
The lesson I learned here is dijit has it's own CSS in which you can customize the
look and feel of their widgets to the smallest level, however don't try to change
dijit's widget rouge style. It will only cause you time lost and heart ache because
the dijit may not work as intended.<br /><br /><br /><br /><br /><p></p><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=8c356591-fea9-4fb9-a67c-c2b5cb16b2d3" /></body>
      <title>CSS'ing Up Those Dijit Widgets dijit.accordion dijit.calendar</title>
      <guid isPermaLink="false">http://bencoffman.com/blog/PermaLink,guid,8c356591-fea9-4fb9-a67c-c2b5cb16b2d3.aspx</guid>
      <link>http://bencoffman.com/blog/2010/09/28/CSSingUpThoseDijitWidgetsDijitaccordionDijitcalendar.aspx</link>
      <pubDate>Tue, 28 Sep 2010 04:33:09 GMT</pubDate>
      <description>&lt;img src="http://bencoffman.com/blog/content/binary/dojo-logo.png" border="0"&gt; 
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Here I am busting my ass fixing code, again :). A few weeks ago I knew nothing about
Dojo now I feel I know more than the person that wrote the code I was debugging. It's
hard stuff to look at code see what the programmer is &lt;i&gt;trying&lt;/i&gt; to do and fix
their code so it does what they &lt;i&gt;intended&lt;/i&gt; it to do. As I mentioned in an earlier
post, while it is frusterating (to me at least) I do believe debugging some else's
code is the &lt;b&gt;best&lt;/b&gt; way to learn. It helps that my guy knew what he was doing,
so his bugs are not easy and he provides some good code inspiration on what he was
trying to attempt. 
&lt;br&gt;
&lt;br&gt;
On to the point. The website we were working on utilizes a dijit &lt;i&gt;(a dijit is pre-built
Dojo functionality like a javascript calendar or javascript accordion that you can
use on your website by just plugging in a few key parameters to be off and running)&lt;/i&gt; accordion
widget. It was displaying incorrectly in IE8. Turns out the problem was a combination
of several things one of which he was trying to embed html in the title attribute
of the accordion pane. Dojo uses the title attribute to make the header of one division
of the accordion. This accordion header is where the user clicks to display the text
associated with that header.&lt;br&gt;
&lt;br&gt;
The mistake was to embed the html in the title attribute. What I came to learn was
dijit provides a wonderful &lt;i&gt;themes&lt;/i&gt; folder in it is a dijit.css class file which
allows you to decorate with CSS all the widgets Dojo makes. After I removed all his
markup from the title attribute for the accordion and removed a "display:block" from
the special dijit.css file in the themes folder, the accordion works as intended in
IE8.&lt;br&gt;
&lt;br&gt;
The lesson I learned here is dijit has it's own CSS in which you can customize the
look and feel of their widgets to the smallest level, however don't try to change
dijit's widget rouge style. It will only cause you time lost and heart ache because
the dijit may not work as intended.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=8c356591-fea9-4fb9-a67c-c2b5cb16b2d3" /&gt;</description>
      <comments>http://bencoffman.com/blog/CommentView,guid,8c356591-fea9-4fb9-a67c-c2b5cb16b2d3.aspx</comments>
      <category>dojo</category>
      <category>IE8</category>
    </item>
    <item>
      <trackback:ping>http://bencoffman.com/blog/Trackback.aspx?guid=74dc3695-42a7-45b9-9e68-c1028b77134c</trackback:ping>
      <pingback:server>http://bencoffman.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://bencoffman.com/blog/PermaLink,guid,74dc3695-42a7-45b9-9e68-c1028b77134c.aspx</pingback:target>
      <dc:creator>Ben Coffman</dc:creator>
      <wfw:comment>http://bencoffman.com/blog/CommentView,guid,74dc3695-42a7-45b9-9e68-c1028b77134c.aspx</wfw:comment>
      <wfw:commentRss>http://bencoffman.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=74dc3695-42a7-45b9-9e68-c1028b77134c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/dojo-logo.png" border="0" />
        <br />
        <br />
        <b>Error Readout:</b>
        <br />
Could not load class 'dijit.form'. Did you spell the name correctly and use a full
path, like 'dijit.form.button'?<br /><br /><b>Fix:</b><br />
In debugging someone else's code (best way to learn a language, but this is a whole
other post) I found a from element and it had dojoType="dijit.form" as an attribute
like so: 
<br /><br />
&lt;form dojoType="dijit.form"&gt;<br />
....<br />
&lt;/form&gt;<br /><br />
 I removed the dojoType="dijit.form" and bingo error was gone in IE8<br /><br /><b>Explanation:</b><br />
There were several issues with this line of markup. 
<br /><blockquote>1. If you were going to add the dojo.form to the form tag the proper way
to add is:<br />
&lt;form dojoType="dijit.form.Form"&gt;<br />
 .....<br />
&lt;/form&gt;<br />
However he was diligently practicing OOP, so much so that in his user control (.NET)
he forgot he had added the &lt;from dojoType="dijit.form.Form"&gt; to the page he
was inserting the user control and therefore having a form nested inside a form, not
a good practice. 
<br /></blockquote><blockquote>2. <a href="http://docs.dojocampus.org/dijit/form/Form">It
turns out that IE in general doesn't do to well with dojo and the form tag</a>; suggesting
instead to use a div tag and add the form attribute. 
<br />
Example:<br />
&lt;div dojoType="dijit.form.Form&gt;<br />
....<br />
&lt;/div&gt;<br /></blockquote><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=74dc3695-42a7-45b9-9e68-c1028b77134c" /></body>
      <title>Could not load class 'dijit.form'. Did you spell the name correctly and use a full path, like 'dijit.form.button'? IE8</title>
      <guid isPermaLink="false">http://bencoffman.com/blog/PermaLink,guid,74dc3695-42a7-45b9-9e68-c1028b77134c.aspx</guid>
      <link>http://bencoffman.com/blog/2010/09/27/CouldNotLoadClassDijitformDidYouSpellTheNameCorrectlyAndUseAFullPathLikeDijitformbuttonIE8.aspx</link>
      <pubDate>Mon, 27 Sep 2010 03:34:18 GMT</pubDate>
      <description>&lt;img src="http://bencoffman.com/blog/content/binary/dojo-logo.png" border="0"&gt; 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Error Readout:&lt;/b&gt;
&lt;br&gt;
Could not load class 'dijit.form'. Did you spell the name correctly and use a full
path, like 'dijit.form.button'?&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Fix:&lt;/b&gt;
&lt;br&gt;
In debugging someone else's code (best way to learn a language, but this is a whole
other post) I found a from element and it had dojoType="dijit.form" as an attribute
like so: 
&lt;br&gt;
&lt;br&gt;
&amp;lt;form dojoType="dijit.form"&amp;gt;&lt;br&gt;
....&lt;br&gt;
&amp;lt;/form&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;I removed the dojoType="dijit.form" and bingo error was gone in IE8&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Explanation:&lt;/b&gt;
&lt;br&gt;
There were several issues with this line of markup. 
&lt;br&gt;
&lt;blockquote&gt;1. If you were going to add the dojo.form to the form tag the proper way
to add is:&lt;br&gt;
&amp;lt;form dojoType="dijit.form.Form"&amp;gt;&lt;br&gt;
&amp;nbsp;.....&lt;br&gt;
&amp;lt;/form&amp;gt;&lt;br&gt;
However he was diligently practicing OOP, so much so that in his user control (.NET)
he forgot he had added the &amp;lt;from dojoType="dijit.form.Form"&amp;gt; to the page he
was inserting the user control and therefore having a form nested inside a form, not
a good practice. 
&lt;br&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;2. &lt;a href="http://docs.dojocampus.org/dijit/form/Form"&gt;It
turns out that IE in general doesn't do to well with dojo and the form tag&lt;/a&gt;; suggesting
instead to use a div tag and add the form attribute. 
&lt;br&gt;
Example:&lt;br&gt;
&amp;lt;div dojoType="dijit.form.Form&amp;gt;&lt;br&gt;
....&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=74dc3695-42a7-45b9-9e68-c1028b77134c" /&gt;</description>
      <comments>http://bencoffman.com/blog/CommentView,guid,74dc3695-42a7-45b9-9e68-c1028b77134c.aspx</comments>
      <category>dojo</category>
      <category>IE8</category>
    </item>
  </channel>
</rss>