<?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>web2.0goodies.com &#187; html</title>
	<atom:link href="http://web2.0goodies.com/blog/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://web2.0goodies.com/blog</link>
	<description>Tips, Tricks, and How To's for Web 2.0</description>
	<lastBuildDate>Tue, 03 Jan 2012 05:34:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Testing websites on IE 7</title>
		<link>http://web2.0goodies.com/blog/html/testing-websites-on-ie-7/</link>
		<comments>http://web2.0goodies.com/blog/html/testing-websites-on-ie-7/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 07:09:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=181</guid>
		<description><![CDATA[Today I was informed that a webapp I had written had some IE7 problems&#8230; argh&#8230; I thought to myself, not ie7&#8230; I went in search of ways to test the site on ie7. I tried Microsofts Virtual PC Image of Windows Vista with IE7, but it crashed on me repeatedly. I tried loading it in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was informed that a webapp I had written had some IE7 problems&#8230;  argh&#8230;  I thought to myself, not ie7&#8230;  I went in search of ways to test the site on ie7.  I tried Microsofts Virtual PC Image of Windows Vista with IE7, but it crashed on me repeatedly.  I tried loading it in VirtualBox instead of VirtualPC, but to no avail.  Then I found <a href="http://finalbuilds.edskes.net/iecollection.htm">a tool</a> I had used at a previous job but had forgotten the name of.</p>
<p><a href="http://finalbuilds.edskes.net/iecollection.htm">IE Collection!</a></p>
<p>IE collection is actively maintained (as of this writing atleast) and can install everything from IE 1.0.</p>
<p>In the end, I just used ie9 developer tools to enable IE 7 browser and document modes.  But, IE Collection is still a fantastic tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/html/testing-websites-on-ie-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Sizing of a cross domain iframe</title>
		<link>http://web2.0goodies.com/blog/uncategorized/dynamic-sizing-of-a-cross-domain-iframe/</link>
		<comments>http://web2.0goodies.com/blog/uncategorized/dynamic-sizing-of-a-cross-domain-iframe/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 19:45:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=150</guid>
		<description><![CDATA[There are several ways to communicate via domains in a browser. One of the simplest is using the hash on a url&#8230; i.e. The part of the url AFTER the # sign. The way this works is&#8230; The parent window can set the url of the child iframe, and the child iframe can set the [...]]]></description>
			<content:encoded><![CDATA[<p>There are several ways to communicate via domains in a browser.  One of the simplest is using the hash on a url&#8230;  i.e.  The part of the url AFTER the # sign.</p>
<p>The way this works is&#8230;  The parent window can set the url of the child iframe, and the child iframe can set the url of the parent window.  The only hangup, is that both windows need to know the correct location for the other window before they can properly set the hash on the other&#8217;s url without navigating the other to a different url&#8230;</p>
<p>Recently I explored methods of accomplishing this for a project I was working on.  After trying a few solutions I came up with a simple clean solution that works GREAT if both sides already know the url for the other&#8230;  And acutally, for resizing, only the page in the iframe needs to know the right url for the parent, as the communication is only one way&#8230; Below is the code&#8230; (jQuery is required, but this could easily be changed just by setting the function as an event handler without jQuery.)</p>
<p>So&#8230;  On all pages in the child iframe you want to resize make sure jQuery is installed and add this code&#8230; </p>
<pre name="code" class="javascript">
jQuery(document).ready(
	function(){
		iframe_resize_extend_jQuery();
		if (top != self) {
			var parent_url = jQuery.getUrlVar('parent_url');
			if(parent_url){
				parent_url = unescape(parent_url);
				jQuery.cookie('parent_url', parent_url);
			} else {
				parent_url = jQuery.cookie('parent_url');
			}

			if(parent_url){
				var url = parent_url + '#'  + document.body.scrollWidth + 'x' + document.body.scrollHeight;
				parent.location = url;
			}
		}
	}
);

function iframe_resize_extend_jQuery(){
	if(!jQuery.cookie) jQuery.cookie = function(name, value, options) {
		if (typeof value != 'undefined') { // name and value given, set cookie
			options = options || {};
			if (value === null) {
				value = '';
				options.expires = -1;
			}
			var expires = '';
			if (options.expires &#038;&#038; (typeof options.expires == 'number' || options.expires.toUTCString)) {
				var date;
				if (typeof options.expires == 'number') {
					date = new Date();
					date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
				} else {
					date = options.expires;
				}
				expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
			}
			// CAUTION: Needed to parenthesize options.path and options.domain
			// in the following expressions, otherwise they evaluate to undefined
			// in the packed version for some reason...
			var path = options.path ? '; path=' + (options.path) : '';
			var domain = options.domain ? '; domain=' + (options.domain) : '';
			var secure = options.secure ? '; secure' : '';
			document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
		} else { // only name given, get cookie
			var cookieValue = null;
			if (document.cookie &#038;&#038; document.cookie != '') {
				var cookies = document.cookie.split(';');
				for (var i = 0; i < cookies.length; i++) {
					var cookie = jQuery.trim(cookies[i]);
					// Does this cookie string begin with the name we want?
					if (cookie.substring(0, name.length + 1) == (name + '=')) {
						cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
						break;
					}
				}
			}
			return cookieValue;
		}
	};

	if(!jQuery.getUrlVars) jQuery.getUrlVars = function(){
		var vars = [], hash;
		var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&#038;');
		for(var i = 0; i < hashes.length; i++)
		{
		  hash = hashes[i].split('=');
		  vars.push(hash[0]);
		  vars[hash[0]] = hash[1];
		}
		return vars;
	};

	if(!jQuery.getUrlVar) jQuery.getUrlVar = function(name){
		return jQuery.getUrlVars()[name];
	};
}
</pre>
<p>And, on the parent window add...</p>
<pre name="code" class="javascript">
<iframe id="resizeIframe" src="http://www.otherdomain.com?parent_url={thisurl}" scrolling="no"></iframe>

var refreshFrequency = 30;
var extraHeight = 0;
var extraWidth = 0;
var lastHeight = 0;
var lastWidth = 0;
var iframeId = 'resizeIframe';

function checkIFrameSize(){
  if(window.location.hash &#038;&#038; document.getElementById(iframeId)){
    var currentHeight = parseInt(document.getElementById(iframeId).style.height.replace(/[^0-9]/g, ''));

    var dimensions = window.location.hash.split('x');

    if(dimensions.length == 2){
        var width = parseInt(dimensions[0].replace(/[^0-9]/g, ''));
        var height = parseInt(dimensions[1].replace(/[^0-9]/g, ''));
    }
    if(!isNaN(width) &#038;&#038; !isNaN(height)){
        var newWidth = (width + extraWidth);
        if(lastWidth != newWidth){
            document.getElementById(iframeId).style.width =  (newWidth) + 'px';
            lastWidth = newWidth;
        }

        var newHeight = (height + extraHeight);
        if(newHeight != lastHeight){
            document.getElementById(iframeId).style.height = (newHeight) + 'px';
            lastHeight = newHeight;
        }
    }
  }
  setTimeout(checkIFrameSize, refreshFrequency);
}

setTimeout(checkIFrameSize, refreshFrequency);
</pre>
<p>That's it!</p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/uncategorized/dynamic-sizing-of-a-cross-domain-iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Selenium to test Ajax</title>
		<link>http://web2.0goodies.com/blog/html/using-selenium-to-test-ajax/</link>
		<comments>http://web2.0goodies.com/blog/html/using-selenium-to-test-ajax/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 20:34:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/html/using-selenium-to-test-ajax-applications-a-rock-solid-way-to-wait-for-ajax/</guid>
		<description><![CDATA[If you&#8217;ve used Selenium before you know it&#8217;s power, and the pain of Ajax and Selenium&#8230;  I spent about a week on it at work and created several helper methods, but was never quite happy with my Ajax solution (waiting for text to be present, blech!!!).  Then, I found this article about getting selenium and [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve used Selenium before you know it&#8217;s power, and the pain of Ajax and Selenium&#8230;  I spent about a week on it at work and created several helper methods, but was never quite happy with my Ajax solution (waiting for text to be present, blech!!!).  <a href="http://agilesoftwaretesting.com/?p=111">Then, I found this article about getting selenium and ajax to play nicely&#8230;</a></p>
<p>It turns out the major JavaScript libraries (jQuery, YUI (v3+), Prototype, and Dojo) provide a way to see if requests are still active.  They provided instructions for writing a function, but I wanted a fool proof method, that JUST WORKS regardless of what library you use.</p>
<p>So, I created this function (Currently supports jQuery, Dojo, and Prototype, not Yui 3 yet):</p>
<pre name="code" class="javascript">
function getActiveRequestCount(){
    var currentActiveRequestCount = 0;
    //Get prototype active requests...
    if(window.Ajax &amp;&amp; window.Ajax.activeRequestCount){
        currentActiveRequestCount += window.Ajax.activeRequestCount;
    }

    //jQuery active requests...
    if(window.jQuery){
        currentActiveRequestCount += jQuery.active;
    }

    //Dojo
    if(window.dojo &amp;&amp; window.dojo.io.XMLHTTPTransport.inFlight.length){
        currentActiveRequestCount += window.dojo.io.XMLHTTPTransport.inFlight.length;
    }
    return currentActiveRequestCount;
}</pre>
<p>Then, use the following selenium command to wait for the request count to be low&#8230;</p>
<pre name="code" class="java">
selenium.waitForCondition("selenium.browserbot.getCurrentWindow().getActiveRequestCount() == 0", "30000");
</pre>
<p>And viola!!!  No more pesky pauses!!!  Or wait for text to be present!!!</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=5618453f-ebdb-8a16-b306-682546ed56b5" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/html/using-selenium-to-test-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome Prototyping Tool!</title>
		<link>http://web2.0goodies.com/blog/php5/awesome-prototyping-tool/</link>
		<comments>http://web2.0goodies.com/blog/php5/awesome-prototyping-tool/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 16:48:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[user interaction]]></category>
		<category><![CDATA[wysiwyg editors]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/php5/awesome-prototyping-tool/</guid>
		<description><![CDATA[Check out this AWESOME free prototyping tool. Pencil Project.&#160; (It&#8217;s a Firefox Plugin / XUL Application) It let&#8217;s you mock up fully functional websites without writing any html code.&#160; Then, you can export it as html, and use it as a starting point for a better mockup.&#160; Or export all the pages to png&#8217;s in [...]]]></description>
			<content:encoded><![CDATA[<p>Check out this AWESOME free prototyping tool. Pencil Project.&nbsp; (It&#8217;s a Firefox Plugin / XUL Application)</p>
<p>It let&#8217;s you mock up fully functional websites without writing any html code.&nbsp; Then, you can export it as html, and use it as a starting point for a better mockup.&nbsp; Or export all the pages to png&#8217;s in one shot, and use those as a starting point in Adobe Illustrator, or your design tool of choice.</p>
<p>It&#8217;s great for useability testing.&nbsp; Mockup your ideas.&nbsp; Put them in front of customers / users, re-prototype, and continue until you get it as good as possible, and meeting your cash cow customers&#8217; needs.&nbsp; THEN make it look good.</p>
<p><a href="http://pencil.evolus.vn/en-US/Home.aspx">http://pencil.evolus.vn/en-US/Home.aspx</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=011af74a-24e6-81ca-90a8-670e7ce9f445" /></div>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/php5/awesome-prototyping-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 Freature Overview Presentation With Sample Code</title>
		<link>http://web2.0goodies.com/blog/uncategorized/html-5-freature-overview-presentation-with-sample-code/</link>
		<comments>http://web2.0goodies.com/blog/uncategorized/html-5-freature-overview-presentation-with-sample-code/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 17:29:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/uncategorized/html-5-freature-overview-presentation-with-sample-code/</guid>
		<description><![CDATA[At work Shawn Lonas sent this out to all of us, it&#8217;s a really good concise overview of some html5 features. http://apirocks.com/html5/html5.html]]></description>
			<content:encoded><![CDATA[<p>At work Shawn Lonas sent this out to all of us,  it&#8217;s a really good concise overview of some html5 features.</p>
<p><a href="http://apirocks.com/html5/html5.html#slide1">http://apirocks.com/html5/html5.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/uncategorized/html-5-freature-overview-presentation-with-sample-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Primer</title>
		<link>http://web2.0goodies.com/blog/html/javascript-primer/</link>
		<comments>http://web2.0goodies.com/blog/html/javascript-primer/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 02:17:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=68</guid>
		<description><![CDATA[SOA powered by JavaScript is the future of the web.  Learn it now!]]></description>
			<content:encoded><![CDATA[<p>So you want to learn JavaScript huh?  Way to go!  SOA powered by JavaScript is the future of the web.  (Trust me).</p>
<p>What is JavaScript?  It&#8217;s a scripting language that all modern web browsers run that allows you to manipulate web pages and do sweet stuff.</p>
<p>To get started, first, you need an easy way to run JavaScript.  While you could write javascript in an html page and run it, it&#8217;s generally easier to be able to run scirpts without making an html page.  To do this, install <a href="https://addons.mozilla.org/en-US/firefox/addon/1843?id=1843&#038;application=firefox">Firebug</a>, and use it&#8217;s console.  (Just install firebug, click on the little cock-roach icon in the lower left of Firefox, and click the console tab, now reload your window.).</p>
<p>Once you have the firebug console working, type the following into the console, and you should get a popup.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Hello World!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here&#8217;s a video that shows how to install and use Firebug:</p>
<p><center><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/MK9PICm4LFA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/MK9PICm4LFA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="355"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=MK9PICm4LFA">www.youtube.com/watch?v=MK9PICm4LFA</a></p></center></p>
<p>If you want to learn more, head over to w3schools&#8217; <a href="http://www.w3schools.com/JS/default.asp">JavaScript tutorial.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/html/javascript-primer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>min-height CSS Hack</title>
		<link>http://web2.0goodies.com/blog/hacks/min-height-css-hack/</link>
		<comments>http://web2.0goodies.com/blog/hacks/min-height-css-hack/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 00:38:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=36</guid>
		<description><![CDATA[I needed a min-height hack for css that worked everywhere. I searched for a while, and found this link: http://www.greywyvern.com/code/min-height-hack. It works as advertised, just checkout the tabs on propertynut.com]]></description>
			<content:encoded><![CDATA[<p>I needed a min-height hack for css that worked everywhere.  I searched for a while, and found this link: <a href="http://www.greywyvern.com/code/min-height-hack">http://www.greywyvern.com/code/min-height-hack</a>.  It works as advertised, just checkout the tabs on <a href="https://propertynut.com/find.aspx?r=details&#038;propertyid=5445#">propertynut.com</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/hacks/min-height-css-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

