<?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>BeckBlog</title>
	<atom:link href="http://blog.jeffbeck.info/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.jeffbeck.info</link>
	<description></description>
	<lastBuildDate>Tue, 22 Jun 2010 23:58:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Remove Addressbar from iPhone Web App</title>
		<link>http://blog.jeffbeck.info/?p=103</link>
		<comments>http://blog.jeffbeck.info/?p=103#comments</comments>
		<pubDate>Tue, 22 Jun 2010 23:55:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=103</guid>
		<description><![CDATA[If you are creating a web app for the iPhone there is an easy to to hide the address bar when opening the page from a link on the users home screen. You simply need to add the following meta tag to your
head. This will also work with the iPad.

1
   &#60;meta name=&#34;apple-mobile-web-app-capable&#34; content=&#34;yes&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>If you are creating a web app for the iPhone there is an easy to to hide the address bar when opening the page from a link on the users home screen. You simply need to add the following meta tag to your<br />
head. This will also work with the iPad.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;apple-mobile-web-app-capable&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p><span id="more-103"></span></p>
<p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;submitHeadline=Remove+Addressbar+from+iPhone+Web+App&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;title=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Remove+Addressbar+from+iPhone+Web+App+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D103&amp;t=Remove+Addressbar+from+iPhone+Web+App" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad HTML Video Autoplay</title>
		<link>http://blog.jeffbeck.info/?p=97</link>
		<comments>http://blog.jeffbeck.info/?p=97#comments</comments>
		<pubDate>Tue, 01 Jun 2010 23:40:52 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=97</guid>
		<description><![CDATA[The Problem
The iPad and also the iPhone have a bit of special behavior when it comes to using the HTML5 video tag. They both have the autoplay functionality shut off. This behavior is also extended to any event which the user has not started the event chain. (AKA you can&#8217;t do the following)

1
&#60;body onLoad=&#34;document.myMovie.play()&#34;&#62;

What it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Problem</strong></p>
<p>The iPad and also the iPhone have a bit of special behavior when it comes to using the HTML5 video tag. They both have the autoplay functionality shut off. This behavior is also extended to any event which the user has not started the event chain. (AKA you can&#8217;t do the following)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">onLoad</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;document.myMovie.play()&quot;</span>&gt;</span></pre></td></tr></table></div>

<p><strong>What it Means</strong></p>
<p>So what this really means you can not have a playlist of videos where one video is loaded as soon as the first ends. Also having timed events from one video kick off sub videos will not work unless the user clicks on the new video. </p>
<p><strong>Is this a Bug?</strong></p>
<p>No this is as intended by Apple look for the Device-Specific Considerations <a href="http://developer.apple.com/safari/library/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html">here</a>. What the idea is that any device that could be charged from a data plan shouldn&#8217;t allow auto play. While this idea makes sense the execution is poor. I am currently using a wifi only iPad so there is no reason for this restriction it would be best in my mind to detect if they are using wifi or 3g and react accordingly. </p>
<p><strong>What to Do</strong><br />
<span id="more-97"></span><br />
Design around this I restructured an interaction from popping up this sub video over the main video to instead make a thumbnail active so it could be click to show this sub video this works in my case as the sub video can be viewed any time after the timed event. </p>
<p>Another option is to show the new video element that will display a play symbol you should be able to set a poster image with some text to guide the users.</p>
<p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;submitHeadline=iPad+HTML+Video+Autoplay&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;title=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+iPad+HTML+Video+Autoplay+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D97&amp;t=iPad+HTML+Video+Autoplay" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=97</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Video and the seeked event</title>
		<link>http://blog.jeffbeck.info/?p=89</link>
		<comments>http://blog.jeffbeck.info/?p=89#comments</comments>
		<pubDate>Tue, 04 May 2010 10:18:00 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=89</guid>
		<description><![CDATA[I have been working with the HTML5 video element a bit on both iPad and the Chrome browser. I&#8217;ve started to find some odd behavior around the seeked event. First a touch of background about the seeked event. According to the spec the seeked event should fire when the seeking IDL attribute changes to false. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with the HTML5 video element a bit on both iPad and the Chrome browser. I&#8217;ve started to find some odd behavior around the seeked event. First a touch of background about the seeked event. According to the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#mediaevents">spec</a> the seeked event should fire when the seeking IDL attribute changes to false. This seems to make perfect sense but when actually using the event it seems inconsistent at best. </p>
<p>I have seen three distinct actions that don&#8217;t make sense to me.<br />
<span id="more-89"></span></p>
<h2>Extra Fires</h2>
<ul>
<li>While dragging the scrub bar the seeked event will fire many times in the Google Chrome 5.0.342.9 beta on windows.</li>
<li>When setting the position by changing the currentTime attribute it will fire the seeked event three times in a row on both the iPad and Chrome.</li>
</ul>
<h2>No Fires</h2>
<ul>
<li>Scrubbing on the iPad never fires the seeked event.</li>
</ul>
<p>So from what I can tell its not the best idea to use the seeked event at this point but the timeupdate event does fire consistently through my testing. So what you can do if you like is keep track of a last value for the timeupdate and then you can detect if it jumps too far (up to you and your use) then fire the logic you wanted to fire on seeked. I am kicking off events at times and I didn&#8217;t want to miss events so simply changing my logic to fire as long as the time is past the event point worked fine for my uses but that may not always work. Keeping track of the last time from the timeupdate shouldn&#8217;t be a very hard addition if you need special seek logic.</p>
<p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;submitHeadline=HTML5+Video+and+the+seeked+event&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;title=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+HTML5+Video+and+the+seeked+event+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D89&amp;t=HTML5+Video+and+the+seeked+event" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Video Poster and the iPad</title>
		<link>http://blog.jeffbeck.info/?p=81</link>
		<comments>http://blog.jeffbeck.info/?p=81#comments</comments>
		<pubDate>Sat, 17 Apr 2010 14:44:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=81</guid>
		<description><![CDATA[While working on a small HTML5 based project for the iPad I found some interesting things with how it handles the poster attribute and defining the video source. The following HTML works fine on Mobile Safari (iPad) and my desktop Chrome.

1
2
  &#60;video id=&#34;vidtest&#34; src=&#34;big_buck_bunny.mp4&#34;  poster='poster.jpg' controls=&#34;controls&#34;&#62;
  &#60;/video&#62;

But moving to the following code [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a small HTML5 based project for the iPad I found some interesting things with how it handles the poster attribute and defining the video source. The following HTML works fine on Mobile Safari (iPad) and my desktop Chrome.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;video</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;vidtest&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;big_buck_bunny.mp4&quot;</span>  <span style="color: #000066;">poster</span>=<span style="color: #ff0000;">'poster.jpg'</span> <span style="color: #000066;">controls</span>=<span style="color: #ff0000;">&quot;controls&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/video<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>But moving to the following code works fine in Chrome but on the iPad (Mobile Safari) it will only show the poster and no way to start the video unless you do the pinch zoom to make the video full screen then the controls will show up.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;video</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;vidtest&quot;</span>  <span style="color: #000066;">poster</span>=<span style="color: #ff0000;">'poster.jpg'</span> <span style="color: #000066;">controls</span>=<span style="color: #ff0000;">&quot;controls&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;big_buck_bunny.mp4&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;video/mp4&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/video<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Simply using the first style is ok if you are only doing one type of video but if you wanted to include other options this issue limits that ability. But for now if you are targeting iPad just use the first option.<br />
<span id="more-81"></span><br />
</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;submitHeadline=HTML5+Video+Poster+and+the+iPad&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;title=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+HTML5+Video+Poster+and+the+iPad+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D81&amp;t=HTML5+Video+Poster+and+the+iPad" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DISQUS Comments</title>
		<link>http://blog.jeffbeck.info/?p=78</link>
		<comments>http://blog.jeffbeck.info/?p=78#comments</comments>
		<pubDate>Thu, 08 Apr 2010 05:56:42 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=78</guid>
		<description><![CDATA[One feature I have really liked on my blogs recently is the ability to just use Twitter to comment so I went ahead and added the DISQUS Comment system the plugin is straight forward and easy to use with WordPress. Moving forward with new site projects I will be strongly considering using DISQUS instead of [...]]]></description>
			<content:encoded><![CDATA[<p>One feature I have really liked on my blogs recently is the ability to just use Twitter to comment so I went ahead and added the DISQUS Comment system the plugin is straight forward and easy to use with WordPress. Moving forward with new site projects I will be strongly considering using <a href="http://disqus.com/overview/">DISQUS </a>instead of an internal comment system, I would suggest checking it out as well as <a href="http://intensedebate.com/">InenseDebate </a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;submitHeadline=DISQUS+Comments&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;title=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+DISQUS+Comments+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D78&amp;t=DISQUS+Comments" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=78</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filling an Array with Objects in PHP</title>
		<link>http://blog.jeffbeck.info/?p=68</link>
		<comments>http://blog.jeffbeck.info/?p=68#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:29:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=68</guid>
		<description><![CDATA[While working in PHP I found the need to fill an array with new objects on the fly. So at first I tried the array_fill function that worked fine for values but when I tried an object I found it was the same object in every position meaning if I modified one they all changed. [...]]]></description>
			<content:encoded><![CDATA[<p>While working in PHP I found the need to fill an array with new objects on the fly. So at first I tried the array_fill function that worked fine for values but when I tried an object I found it was the same object in every position meaning if I modified one they all changed. What I needed was a new object in each. The easiest way I found to do that was a for loop. </p>
<p>The following doesn&#8217;t work correctly</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$arr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_fill</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">new</span> MyObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>So to accomplish the same idea I did the following</p>

<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="php" style="font-family:monospace;"> <span style="color: #000088;">$arr</span><span style="color: #339933;">=</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">//Fill Array with new object</span>
      <span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> MyObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;submitHeadline=Filling+an+Array+with+Objects+in+PHP&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;title=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Filling+an+Array+with+Objects+in+PHP+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D68&amp;t=Filling+an+Array+with+Objects+in+PHP" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=68</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pptx mime type</title>
		<link>http://blog.jeffbeck.info/?p=60</link>
		<comments>http://blog.jeffbeck.info/?p=60#comments</comments>
		<pubDate>Sun, 17 Jan 2010 17:48:16 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mime]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=60</guid>
		<description><![CDATA[I was working with a CMS and found that one file was not downloading correctly people were saying that the file was being zipped up by the CMS. Well it turns out it was the issue with IE6 and a bad MIME Type. The fix is simple for pptx you need the mime type application/vnd.openxmlformats-officedocument.presentationml.presentation [...]]]></description>
			<content:encoded><![CDATA[<p>I was working with a CMS and found that one file was not downloading correctly people were saying that the file was being zipped up by the CMS. Well it turns out it was the issue with IE6 and a bad MIME Type. The fix is simple for pptx you need the mime type application/vnd.openxmlformats-officedocument.presentationml.presentation once that was added everything was working correctly. With out this a PPTX file will download as a zip.</p>
<p>A few links on the subject:</p>
<ul>
<li><a href="http://blogs.msdn.com/dmahugh/archive/2006/08/08/692600.aspx">Office 2007 Mime Types</a></li>
<li><a href="http://serverfault.com/questions/19060/why-are-docx-xlsx-pptx-downloading-from-webserver-as-zip-files">How to fix in Apache</a></li>
</ul>
<p><span id="more-60"></span><br />
</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;submitHeadline=pptx+mime+type&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;title=pptx+mime+type" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+pptx+mime+type+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D60&amp;t=pptx+mime+type" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=60</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Removing Newline Chars</title>
		<link>http://blog.jeffbeck.info/?p=56</link>
		<comments>http://blog.jeffbeck.info/?p=56#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:32:00 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=56</guid>
		<description><![CDATA[We were trying to trim white space from a column that had some newlines. The problem was the oracle trim() was only removing spaces. We found that we had to do two Replace operations Replace(col,char(10),&#8221;) and Replace(col,char(13),&#8221;) one for linefeed and one for newline. I switch between many Languages and I found it annoying I [...]]]></description>
			<content:encoded><![CDATA[<p>We were trying to trim white space from a column that had some newlines. The problem was the oracle trim() was only removing spaces. We found that we had to do two Replace operations Replace(col,char(10),&#8221;) and Replace(col,char(13),&#8221;) one for linefeed and one for newline. I switch between many Languages and I found it annoying I couldn&#8217;t use \n or \r but all well I don&#8217;t use Oracle that often.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;submitHeadline=Oracle+Removing+Newline+Chars&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;title=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Oracle+Removing+Newline+Chars+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D56&amp;t=Oracle+Removing+Newline+Chars" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Passing by Value into an Inline Function</title>
		<link>http://blog.jeffbeck.info/?p=51</link>
		<comments>http://blog.jeffbeck.info/?p=51#comments</comments>
		<pubDate>Thu, 31 Dec 2009 18:49:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=51</guid>
		<description><![CDATA[I have a web page that needs to go through a bootstrap step in order to make all the correct Ajax calls. So I was simply looping through the results and making the Ajax call like the following. You will note that I needed to pass a name to the processing of the data returned [...]]]></description>
			<content:encoded><![CDATA[<p>I have a web page that needs to go through a bootstrap step in order to make all the correct Ajax calls. So I was simply looping through the results and making the Ajax call like the following. You will note that I needed to pass a name to the processing of the data returned but my first attempt was not working.</p>

<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
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</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>myJSONObject.<span style="color: #660066;">campus</span>.<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>
  campus_name <span style="color: #339933;">=</span> myJSONObject.<span style="color: #660066;">campus</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #000066;">name</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> campURL<span style="color: #339933;">=</span>myJSONObject.<span style="color: #660066;">campus</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span><span style="color: #339933;">;</span>
  $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        type<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;post&quot;</span><span style="color: #339933;">,</span>
        url<span style="color: #339933;">:</span> campURL<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;/fetchcampusdata.jsp?campusid=&quot;</span><span style="color: #339933;">+</span>id<span style="color: #339933;">,</span>
	datatype<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;JSON&quot;</span><span style="color: #339933;">,</span>
	cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data2<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		processCampusData<span style="color: #009900;">&#40;</span>data2<span style="color: #339933;">,</span> campus_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>request<span style="color: #339933;">,</span>error<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;error in processing campus data: &quot;</span><span style="color: #339933;">+</span>error<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: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>That code was not working correctly as all the names were coming up as the last one in the loop. And thinking more about it that makes perfect sense. The problem is when the success function fires it looks back to the Activation Record which contains campus_name which has been modified by the loop. So what I need to do to fix it was simply move the Ajax call to a function so an AR would be created for each call allowing me to use the campus_name variable correctly.</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="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</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>myJSONObject.<span style="color: #660066;">campus</span>.<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>
  campus_name <span style="color: #339933;">=</span> myJSONObject.<span style="color: #660066;">campus</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #000066;">name</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> campURL<span style="color: #339933;">=</span>myJSONObject.<span style="color: #660066;">campus</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span><span style="color: #339933;">;</span>
  callFetch<span style="color: #009900;">&#40;</span>campURL<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>myJSONObject.<span style="color: #660066;">campus</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #339933;">,</span>campus_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<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
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> callFetch<span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span>id<span style="color: #339933;">,</span>campus_name<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        type<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;post&quot;</span><span style="color: #339933;">,</span>
        url<span style="color: #339933;">:</span> url<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;/fetchcampusdata.jsp?campusid=&quot;</span><span style="color: #339933;">+</span>id<span style="color: #339933;">,</span>
	datatype<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;JSON&quot;</span><span style="color: #339933;">,</span>
	cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data2<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		processCampusData<span style="color: #009900;">&#40;</span>data2<span style="color: #339933;">,</span> campus_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>request<span style="color: #339933;">,</span>error<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;error in processing campus data: &quot;</span><span style="color: #339933;">+</span>error<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: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;submitHeadline=JavaScript+Passing+by+Value+into+an+Inline+Function&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;title=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+JavaScript+Passing+by+Value+into+an+Inline+Function+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D51&amp;t=JavaScript+Passing+by+Value+into+an+Inline+Function" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Table Row Height Hack</title>
		<link>http://blog.jeffbeck.info/?p=44</link>
		<comments>http://blog.jeffbeck.info/?p=44#comments</comments>
		<pubDate>Tue, 08 Dec 2009 22:24:24 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://blog.jeffbeck.info/?p=44</guid>
		<description><![CDATA[Working with a fixed height and width table I found a problem where rows were expanding too much I needed each row to only grow in height enough to contain the text and not fill the rest of the table. The number of rows was dynamic but the height fixed. The hack is simple add [...]]]></description>
			<content:encoded><![CDATA[<p>Working with a fixed height and width table I found a problem where rows were expanding too much I needed each row to only grow in height enough to contain the text and not fill the rest of the table. The number of rows was dynamic but the height fixed. The hack is simple add a height to each row of 1px which will make it so the rows only grow enough to contain your text then add a last row to act as a buffer with no height. Below the fold I have examples.</p>
<p><span id="more-44"></span></p>
<p></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200px&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;example.gif&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Some Text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;example2.gif&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Some More Text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>    
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">colspan</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span> <span style="color: #808080; font-style: italic;">&lt;!--The Buffer Row--&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;submitHeadline=HTML+Table+Row+Height+Hack&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;title=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+HTML+Table+Row+Height+Hack+@+http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fblog.jeffbeck.info%2F%3Fp%3D44&amp;t=HTML+Table+Row+Height+Hack" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://jeffbeck.info/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffbeck.info/?feed=rss2&amp;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
