<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SharePoint Fun &#187; Web Design</title>
	<atom:link href="http://blog.qumsieh.ca/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.qumsieh.ca</link>
	<description>Developer's blog related to ASP.NET, SharePoint and Telerik Web Controls</description>
	<lastBuildDate>Fri, 27 Jan 2012 19:08:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jqGrid, setRowData and GridComplete</title>
		<link>http://blog.qumsieh.ca/2010/09/15/jqgrid-setrowdata-and-gridcomplete/</link>
		<comments>http://blog.qumsieh.ca/2010/09/15/jqgrid-setrowdata-and-gridcomplete/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 23:41:22 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[jqGrid]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=690</guid>
		<description><![CDATA[I had such a hard time getting this to work, it most definitely deserved a blog post. Hopefully others can make sense of this by reading this post. Scenario I wanted to do some conditional formatting on my rows of data using the gridComplete method. In order for me to do conditional formatting, I need [...]]]></description>
			<content:encoded><![CDATA[<p>I had such a hard time getting this to work, it most definitely deserved a blog post. Hopefully others can make sense of this by reading this post.</p>
<p><span style="text-decoration: underline;">Scenario</span><br />
I wanted to do some conditional formatting on my rows of data using the <strong>gridComplete</strong> method. In order for me to do conditional formatting, I need to be able to access any column for a given row, so I can affect the cell contents. Now, from a jqGrid wiki/documentation perspective, there appears to be two different methods we could use: <strong>setCell</strong> or <strong>setRowData</strong>.</p>
<p><strong>setRowData</strong> is what we&#8217;re going to talk about here. Consider the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">gridComplete<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> rowData <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getRowData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> rowData.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqGrid</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setRowData'</span><span style="color: #339933;">,</span> rowData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>color<span style="color: #339933;">:</span><span style="color: #3366CC;">'red'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>Now before we get into what this does specifically, the above won&#8217;t work, and you won&#8217;t have a clue why. No error messages, nothing in the Firefox console, nada. I really scratched my head over this for a while, until I started to notice that users on forums and stackoverflow were using <strong>getDataIDs</strong>, not <strong>getRowData</strong>. So re-written as follows, it works:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">gridComplete<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> rowData <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getDataIDs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> rowData.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqGrid</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setRowData'</span><span style="color: #339933;">,</span> rowData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>color<span style="color: #339933;">:</span><span style="color: #3366CC;">'red'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>So while the above does work, it&#8217;s important to understand why the previous bit of code did not. If you want to use <strong>getRowData</strong>, then when a method like <strong>setRowData</strong> asks for <strong>rowID</strong>, instead of passing in <strong>rowData[i]</strong>, you need to specify <strong>rowData[i].ID</strong>. That&#8217;s the key differentiator. If we use <strong>getDataIDs</strong>, obviously we can use <strong>rowData[i]</strong> because the array only contains IDs, instead of the entire row object.</p>
<p>Now, what does the above do. Well, it iterates through all the rows for your grid, and set&#8217;s the color of each cell text to red.</p>
<p>One other thing to note, if you want to set a different style like <strong>background-color</strong>, you won&#8217;t be able to set it by simply replacing <strong>color</strong> with <strong>background-color</strong>, you&#8217;ll need to set a class and define your <strong>background-color</strong> in your class:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">.<span style="color: #660066;">myclass</span> td <span style="color: #009900;">&#123;</span>
    font<span style="color: #339933;">-</span>weight <span style="color: #339933;">:</span> bold <span style="color: #339933;">!</span>important<span style="color: #339933;">;</span>
    background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span> red <span style="color: #339933;">!</span>important<span style="color: #339933;">;</span>
    color<span style="color: #339933;">:</span> white <span style="color: #339933;">!</span>important<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>	
&nbsp;
...
&nbsp;
<span style="color: #660066;">gridComplete</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> rowData <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getDataIDs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> rowData.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqGrid</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setRowData'</span><span style="color: #339933;">,</span> rowData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'myclass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>It&#8217;s important to note that the <strong>false</strong> parameter simply means that I want to affect the entire row, if you wanted to single out a particular column FOR ALL ROWS, it would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">gridComplete<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> rowData <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getDataIDs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> rowData.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#backlog&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqGrid</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setRowData'</span><span style="color: #339933;">,</span> rowData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>Title<span style="color: #339933;">:</span><span style="color: #3366CC;">'some new content for cell'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'myClass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>Hopefully that was helpful!</p>
<p>Shereen</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2010/09/15/jqgrid-setrowdata-and-gridcomplete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Parse An Ajax [object XMLHttpRequest]</title>
		<link>http://blog.qumsieh.ca/2010/06/18/how-to-parse-an-ajax-object-xmlhttprequest/</link>
		<comments>http://blog.qumsieh.ca/2010/06/18/how-to-parse-an-ajax-object-xmlhttprequest/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 19:30:48 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=658</guid>
		<description><![CDATA[This is a quick post to summarize a couple areas of confusion I often see on the web surrounding Ajax and the XMLHttpRequest call. Read about what Ajax is all about and how to parse the XMLHttpRequest response.]]></description>
			<content:encoded><![CDATA[<p>This is a quick post to summarize a couple areas of confusion I often see on the web surrounding Ajax and the XMLHttpRequest call. I think for myself, the best source of information that summarizes how this all works is the Javascript Developer Center over at Yahoo. In particular, this article: <a href="http://developer.yahoo.com/javascript/howto-ajax.html">http://developer.yahoo.com/javascript/howto-ajax.html</a></p>
<p>So what is all this ajax hype? Let&#8217;s break it down based on the great summary from Yahoo:</p>
<blockquote><p>In a traditional, non-AJAX web world, if your web application needs to get new data to update itself &#8212; even if that&#8217;s just a tiny bit of data &#8212; you write your page so that when new data is required a user action (a button click, for example) triggers the browser to make an HTTP connection (a form submission) back to the web server. The problem is that with each HTTP connection, a new page is reloaded. All the elements of the page are broken down and recreated each time while the user waits for the network and waits for the page to redraw. Its incredibly inefficient, slow, and not much fun for the user.</p></blockquote>
<p>Great explanation.</p>
<p>Now, we use a lot of Ajax in our applications here at <a href="http://www.blackninjasoftware.com">Black Ninja</a> because of it&#8217;s efficiency, ease of use and simplicity. What I&#8217;d like to point out are the options and gotchas for parsing the XMLHttpRequest object (directly from the Yahoo article credited above, but summarized in bullet form. Anything in green are my comments):</p>
<ol>
<li>After the XMLHttpRequest call is complete, the response data is contained either in the responseText property, the responseXML property, or both. <span style="color: #339966;">So if for example, you&#8217;re alerting on your response object, and the message box returns &#8220;[object XMLHttpRequest]&#8220;, the response data is either in response.responseText or response.responseXML.</span></li>
<li>If the data you get back from the web service is in XML format, both responseXML and responseText are filled.</li>
<li>If the data is in any other format, responseText is filled. However, whether responseXML gets filled is dependent on the browser and the Content-type the server returns (text/xml or application/xml). In practice, responseText seems to be more reliably filled across browsers and web services.</li>
<li>If the responseXML property is filled by the XMLHttpRequest object, that property contains a Document object whose elements you can access in JavaScript using standard DOM methods (getElementsByTagName, etc).</li>
<li>If your response format was XML but all you have is responseText, you will need to use an XML parser to get the information you need out of the XML text. Both Mozilla and Internet Explorer have XML parsers built in; see <a href="http://www.faqts.com/knowledge_base/view.phtml/aid/15302/fid/616">this</a> tutorial from <a href="www.faqts.com">www.faqts.com</a> for help in getting started.</li>
<li>If your response was in JSON format parsing is perhaps easiest of all. JSON is short for JavaScript Object Notation &#8212; JSON is JavaScript. To interpret a JSON response just eval the response, and you&#8217;ll get a JavaScript object back:

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> myObj <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">eval</span> <span style="color: #009900;">&#40;</span> xmlhttp.<span style="color: #660066;">responseText</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once you have the data in hand you can update the page with standard JavaScript and DHTML methods. No need to reload or redraw the entire page &#8212; just modify the part of the page that needs the new data.</li>
</ol>
<p>Super great summary, thank you <a href="http://developer.yahoo.com/">Yahoo Developer Center</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2010/06/18/how-to-parse-an-ajax-object-xmlhttprequest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jqGrid Text/Word Wrapping</title>
		<link>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/</link>
		<comments>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 04:54:31 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=598</guid>
		<description><![CDATA[Just a quick post for anyone else having this issue. I am working with the latest version of jqGrid, and I am dealing with cell data that is longer than the width of the cell making it difficult to see. I wanted to have this data wrap and the height of the cell adjust to [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post for anyone else having this issue. I am working with the latest version of <a href="http://www.trirand.com/blog/">jqGrid</a>, and I am dealing with cell data that is longer than the width of the cell making it difficult to see. I wanted to have this data wrap and the height of the cell adjust to fit the wrapped content.</p>
<p>I found a <a href="http://www.trirand.com/blog/?page_id=393/help/word-wrap-support&#038;value=word%2525wrap%25251&#038;search=2">ton of useful</a> info on the jqGrid forums but it didn&#8217;t quite get me there.</p>
<p>The forum article in the above link suggests that you add the follwing CSS to your page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">.ui-jqgrid tr.jqgrow td {
    white-space: normal !important;
}</pre></td></tr></table></div>

<p>The above worked great for FF, but in IE, it would wrap the content, but the cell height would not auto adjust and therefore you really couldn&#8217;t see the full content. So I made a couple more changes as per the code snippet below and this seemed to work for me.</p>
<p>So the <strong>height:auto</strong> forces the cell height to auto adjust based on the size of the wrapped content. I haven&#8217;t noticed any side effects of changing this. If anyone has I&#8217;d love to hear about it. The<strong> vertical-align:top</strong> ensures that the text positions at the top so that the cells with less content don&#8217;t disappear in the centre due to the larger cell blocks. And finally, I added a bit of <strong>padding</strong> so that my cells don&#8217;t look oddly aligned due to the vertical-align bit, but that&#8217;s optional. It&#8217;ll work without it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">.ui-jqgrid tr.jqgrow td {
    white-space: normal !important;
    height:auto;
    vertical-align:text-top;
    padding-top:2px;
}</pre></td></tr></table></div>

<p>If anyone else has run into this issue or has had to make a similar change, add your contribution to the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Get All Divs Whose ID Starts With</title>
		<link>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/</link>
		<comments>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 21:46:23 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=584</guid>
		<description><![CDATA[Structure: 1 2 3 4 &#60;div id=&#34;thisismydiv1&#34;&#62;&#60;/div&#62; &#60;div id=&#34;thisismydiv2&#34;&#62;&#60;/div&#62; &#60;div id=&#34;thisismydiv3&#34;&#62;&#60;/div&#62; &#60;div id=&#34;thisismydiv4&#34;&#62;&#60;/div&#62; To return an array of all divs that start with &#8216;thisismydiv&#8217;, you would use the following: 1 var divList = $&#40;&#34;div[id^='thisismydiv']&#34;&#41;; The above translates to, find me all divs whose id starts with &#8216;thisismydiv&#8217;. You could now do something cool like add [...]]]></description>
			<content:encoded><![CDATA[<p>Structure:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;thisismydiv1&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv2&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv3&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv4&quot;&gt;&lt;/div&gt;</pre></td></tr></table></div>

<p>To return an array of all divs that start with &#8216;thisismydiv&#8217;, you would use the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> divList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div[id^='thisismydiv']&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The above translates to, find me all divs whose id starts with &#8216;thisismydiv&#8217;. You could now do something cool like add a class to all those divs:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div[id^='thisismydiv']&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myClass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery UI Tabs &#8211; Creating Closable Tabs</title>
		<link>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/</link>
		<comments>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:05:51 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=568</guid>
		<description><![CDATA[Ok, so this is really a follow up to my previous post where I outlined how to build jQuery Tabs that Open and Close. I did end that post with a small TODO for myself: integrate the close capability into the tab itself so the user didn&#8217;t have to click a button to close that [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so this is really a follow up to my previous <a href="http://blog.qumsieh.ca/2009/10/27/building-jquery-tabs-that-open-close/">post</a> where I outlined how to build jQuery Tabs that Open and Close. I did end that post with a small TODO for myself: integrate the close capability into the tab itself so the user didn&#8217;t have to click a button to close that tab.</p>
<p>Now after doing a bit of digging, I learned that this is actually functionality that is in the works for future releases of jQuery UI. Ticket <a href="http://dev.jqueryui.com/ticket/3924" target="_blank">3924</a> is currently open and in development, which is a good sign. Further investigation landed me on this page: <a href="http://jsbin.com/uqage">http://jsbin.com/uqage</a> which is a fantastic example of how the Closable Tabs concept could work.</p>
<p>My final solution involved me tweaking the above to work as follows:</p>
<h3>Setting Up the HTML</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;mytabs&quot;&gt; 
   &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#tabs-home&quot;&gt;My Projects Home&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
   &lt;div id=&quot;tabs-home&quot;&gt;
      &lt;h3&gt;Welcome to My Projects Home&lt;/h3&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;addTab('myActiveProjects', 'My Active Projects', 'RadGrid1')&quot;&gt;My Active Projects&lt;/a&gt;&lt;/p&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;addTab('mySalesActivities', 'My Sales Activities', 'RadGrid2')&quot;&gt;My Sales Activities&lt;/a&gt;&lt;/p&gt;
   &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;tabs-myActiveProjects&quot; style=&quot;display:none;&quot;&gt;
&lt;h3&gt;My Active Projects&lt;/h3&gt;
&nbsp;
&lt;/div&gt;
&lt;div id=&quot;tabs-mySalesActivities&quot; style=&quot;display:none;&quot;&gt;
&lt;h3&gt;My Sales Activities&lt;/h3&gt;
&nbsp;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Wiring Up the Javascript</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span>init<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// tabs init with a custom tab template and an &quot;add&quot; callback filling in the content</span>
    <span style="color: #003366; font-weight: bold;">var</span> $tabs <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        tabTemplate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;#{href}&quot;&gt;#{label}&lt;/a&gt; &lt;span class=&quot;ui-test&quot;&gt;&lt;img src=&quot;images/cross.png&quot; /&gt;&lt;/span&gt;&lt;/li&gt;'</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// close icon: removing the tab on click</span>
    <span style="color: #006600; font-style: italic;">// note: closable tabs gonna be an option in the future - see http://dev.jqueryui.com/ticket/3924</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytabs span.ui-test'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #339933;">,</span>$tabs<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytabs span.ui-test'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> addTab<span style="color: #009900;">&#40;</span>tabID<span style="color: #339933;">,</span> tabName<span style="color: #339933;">,</span> grid<span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// double check to see if tab is already open</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^=#tabs-&quot;</span><span style="color: #339933;">+</span> tabID <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^=#tabs-&quot;</span><span style="color: #339933;">+</span> tabID <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        currentTabID <span style="color: #339933;">=</span> tabID<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// this will add a tab via the standard method</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;add&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #339933;">,</span>tabName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> tabID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Finalizing the Styles</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&lt;script type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;jquery-1.3.2.min.js&quot;</span><span style="color: #00AA00;">&gt;</span>&lt;/script<span style="color: #00AA00;">&gt;</span>
&lt;script type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;jquery-ui-1.7.2.custom.min.js&quot;</span><span style="color: #00AA00;">&gt;</span>&lt;/script<span style="color: #00AA00;">&gt;</span>
&lt;link type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;styles/smoothness/jquery-ui-1.7.2.custom.css&quot;</span> rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
    <span style="color: #cc00cc;">#mytabs</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
    <span style="color: #cc00cc;">#mytabs</span> li <span style="color: #6666ff;">.ui-test</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.5em</span> <span style="color: #933;">0.4em</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p>Please, please leave a comment if you have any difficulty with this and I&#8217;ll do my best to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Site Cutover</title>
		<link>http://blog.qumsieh.ca/2009/09/27/site-cutover/</link>
		<comments>http://blog.qumsieh.ca/2009/09/27/site-cutover/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 22:08:11 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=486</guid>
		<description><![CDATA[Hi everyone, just wanted to post a quick note to let you all know that my blog is undergoing a few changes, one of those being a new hosting company, Rackspace. There are a few things that have not quite been cut over properly, so I&#8217;ll be dealing with those in the next couple of [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, just wanted to post a quick note to let you all know that my blog is undergoing a few changes, one of those being a new hosting company, Rackspace. There are a few things that have not quite been cut over properly, so I&#8217;ll be dealing with those in the next couple of days. If anyone notices anything, please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/09/27/site-cutover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Party with Vancouver IT community Monday June 8th</title>
		<link>http://blog.qumsieh.ca/2009/06/02/party-with-vancouver-it-community-monday-june-8th/</link>
		<comments>http://blog.qumsieh.ca/2009/06/02/party-with-vancouver-it-community-monday-june-8th/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 23:57:21 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Telerik]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=444</guid>
		<description><![CDATA[The Vancouver IT community is hosting a DevTeach kick off party on Monday, June 8th. This is the official social event for DevTeach Vancouver so come socialize with us! The event is not just for the attendees of DevTeach Vancouver it&#8217;s a free event for everyone. It&#8217;s a unique chance for the attendees, speakers and [...]]]></description>
			<content:encoded><![CDATA[<p>The Vancouver IT community is hosting a DevTeach kick off party on Monday, June 8th. This is the official social event for DevTeach Vancouver so come socialize with us! The event is not just for the attendees of DevTeach Vancouver it&#8217;s a free event for everyone. It&#8217;s a unique chance for the attendees, speakers and locals to meet and talk over some free beer and pool. I&#8217;ll be there! The event will be held at the Soho location and you need to RSVP to attend.</p>
<p>To find out more visit this url: <a href="http://party.cuga.ca/Home.aspx">http://party.cuga.ca/Home.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/06/02/party-with-vancouver-it-community-monday-june-8th/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I&#8217;m heading to RailsConf next week!</title>
		<link>http://blog.qumsieh.ca/2009/04/30/im-heading-to-railsconf-next-week/</link>
		<comments>http://blog.qumsieh.ca/2009/04/30/im-heading-to-railsconf-next-week/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 22:17:32 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=429</guid>
		<description><![CDATA[While I don&#8217;t spend the majority of my time coding with Ruby in Rails, I really do enjoy it and was excited at the opportunity to attend my very first RailsConf this year. I&#8217;ve heard nothing but great things about this conference and am hoping to up my ruby and rails skills a little bit. [...]]]></description>
			<content:encoded><![CDATA[<p>While I don&#8217;t spend the majority of my time coding with Ruby in Rails, I really do enjoy it and was excited at the opportunity to attend my very first RailsConf this year. I&#8217;ve heard nothing but great things about this conference and am hoping to up my ruby and rails skills a little bit.</p>
<p>Anyone else planning to go?<br />
<a href="http://www.railsconf.com"><br />
<img src="http://assets.en.oreilly.com/1/event/24/rails2009_210x60.jpg" width="210" height="60"  border="0"  alt="RailsConf 2009" title="RailsConf 2009"  /><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/04/30/im-heading-to-railsconf-next-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Criteria For Hiring a Good Developer</title>
		<link>http://blog.qumsieh.ca/2009/04/03/criteria-for-hiring-a-good-developer/</link>
		<comments>http://blog.qumsieh.ca/2009/04/03/criteria-for-hiring-a-good-developer/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 19:38:37 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=401</guid>
		<description><![CDATA[If anyone is interested, Black Ninja posted a relevant article on what we consider to be a good developer. The article in reference is actually written by Daniel over at inter-sections.net and is the best thing I&#8217;ve seen to date that describes how we feel about web development and the community we&#8217;re a part of. [...]]]></description>
			<content:encoded><![CDATA[<p>If anyone is interested, <a href="http://blackninjasoftware.com">Black Ninja</a> posted a relevant <a href="http://blackninjasoftware.com/2009/04/01/looking-for-another-ninja-what-makes-a-good-programmer/#comment-28">article</a> on what we consider to be a good developer. The article in reference is actually written by <a href="http://inter-sections.net/2007/11/13/how-to-recognise-a-good-programmer">Daniel</a> over at inter-sections.net and is the best thing I&#8217;ve seen to date that describes how we feel about web development and the community we&#8217;re a part of.</p>
<p>I&#8217;ll caution everyone that&#8217;s it meant to be a guide, and not something we need to live by to the letter. Feedback is most welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/04/03/criteria-for-hiring-a-good-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at DevTeach!</title>
		<link>http://blog.qumsieh.ca/2009/02/25/speaking-at-devteach-in-june/</link>
		<comments>http://blog.qumsieh.ca/2009/02/25/speaking-at-devteach-in-june/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 19:40:56 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[Telerik]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=363</guid>
		<description><![CDATA[Greetings everyone! I am very excited to annouce that I have been selected to speak at the DevTeach conference that will be held here in Vancouver from June 8-12. I spend a great deal of time blogging about working with the Telerik web controls in my SharePoint development, so I figured this would be a good [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><span style="text-decoration: underline;"><a href="http://www.devteach.com"></a><a href="http://devteach.com"><img class="alignnone size-full wp-image-370" title="vandevt-e" src="http://blog.qumsieh.ca/wp-content/uploads/2009/02/vandevt-e.jpg" alt="" width="500" height="81" /></a></span></p>
<p style="text-align: left;">Greetings everyone! I am very excited to annouce that I have been selected to speak at the <strong>DevTeach</strong> conference that will be held here in Vancouver from <strong><span style="color: #0000ff;">June 8-12</span></strong>. I spend a great deal of time blogging about working with the Telerik web controls in my SharePoint development, so I figured this would be a good opportunity to share some of the things I&#8217;ve learned and to demonstrate how easy it is to integrate these into your projects.</p>
<p style="text-align: left;">This is a great conference that promises to be the biggest developer, DBA and ITPro conference in Canada. It&#8217;s jam-packed with advanced sessions (level 300 and 400) all on the latest versions of Microsoft products and technologies. I encourage you all to at least check it out and see if some of the other sessions or topics might appeal to you.</p>
<p style="text-align: left;">Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/02/25/speaking-at-devteach-in-june/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

