<?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>Night Blue Fruit Development Blog &#187; HTML</title>
	<atom:link href="http://www.nightbluefruit.com/blog/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nightbluefruit.com/blog</link>
	<description>Sharing what we learn</description>
	<lastBuildDate>Thu, 17 Jun 2010 15:58:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Copying an entire website with Httrack</title>
		<link>http://www.nightbluefruit.com/blog/2010/03/copying-an-entire-website-with-httrack/</link>
		<comments>http://www.nightbluefruit.com/blog/2010/03/copying-an-entire-website-with-httrack/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 21:57:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=90</guid>
		<description><![CDATA[As a web developer, you often get asked to update and upgrade existing websites, and to fix issue with existing websites.
More often than not, its easier to do this on a local copy of the website than on a live remote server.
There are various ways to copy an entire website, but sometimes when a site [...]]]></description>
			<content:encoded><![CDATA[<p>As a web developer, you often get asked to update and upgrade existing websites, and to fix issue with existing websites.</p>
<p>More often than not, its easier to do this on a local copy of the website than on a live remote server.</p>
<p>There are various ways to copy an entire website, but sometimes when a site isn&#8217;t very well designed (eg with absolute rather than relative links) this can take quite a bit of sorting out.</p>
<p>This is where a tool called <a href="http://www.httrack.com/" target="_blank">Httrack</a> comes in every handy. It&#8217;ll download the website for you over http (so you don&#8217;t even need ftp login details) and convert all links to relative links.</p>
<p>Its available for both Windows and Linux, and is in the repositories for Ubuntu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2010/03/copying-an-entire-website-with-httrack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps and Dynamic IFRAMEs</title>
		<link>http://www.nightbluefruit.com/blog/2009/07/google-maps-and-iframes/</link>
		<comments>http://www.nightbluefruit.com/blog/2009/07/google-maps-and-iframes/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 23:25:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://local.nightbluefruit.com/blog/?p=37</guid>
		<description><![CDATA[I recently created an application that displayed a Google Map in an IFRAME in the main page.
The IFRAME itself was  created by running a small piece of javascript to populate innerHTML in a specific DIV container.
For some reason, several of the tiles were missing from the page when it first rendered.
After tricking around with [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created an application that displayed a Google Map in an IFRAME in the main page.</p>
<p>The IFRAME itself was  created by running a small piece of javascript to populate innerHTML in a specific DIV container.</p>
<p>For some reason, several of the tiles were missing from the page when it first rendered.</p>
<p>After tricking around with this for ages, I eventually came up a solution.</p>
<p>When you insert a Google Map in a page, either in a standard page or in an IFRAME, the map will display according to the geometry of the page. For standard page, the geometry is straightforward, and you generally won&#8217;t encounter any problems.</p>
<p>In a page containing an IFRAME things are a little different, particularly when you create the IFRAME on the fly.</p>
<p>Consider this:</p>
<p>A page starts to render. Its a long page, and half way down, some javascript runs to create an IFRAME. This IFRAME then goes off and pulls down a Google Map, but this process starts before the parent page is fully rendered.</p>
<p>Result: Google Map is wonky.</p>
<p>So what&#8217;s the solution?</p>
<p>Basically, you just need to insert a little delay into your Javascript to allow the parent page fully render before the Google Map create begins:</p>
<p>eg</p>
<p><strong style="color: black; background-color: #99ff99;">setTimeout</strong>(js_viewGoogleMap,1000);</p>
<p>If you need to pass co-ords to your <strong style="color: black; background-color: #a0ffff;">map</strong> rendering function, just<br />
create an inner function in your primary function:</p>
<p>eg</p>
<p>function js_viewGoogleMap(x,y) {</p>
<p>function loadMap() {</p>
<p>load(x,y);</p>
<p>}</p>
<p><strong style="color: black; background-color: #99ff99;"> setTimeout</strong>(loadMap,1000);</p>
<p>}</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2009/07/google-maps-and-iframes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multidimensional arrays in form data</title>
		<link>http://www.nightbluefruit.com/blog/2008/02/multidimensional-arrays-in-form-data/</link>
		<comments>http://www.nightbluefruit.com/blog/2008/02/multidimensional-arrays-in-form-data/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 21:53:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=13</guid>
		<description><![CDATA[Readers are probably aware that you can pass an array to a script from a HTML form.
For instance, if you want to pass multiple checkbox items, or data from a SELECT where the user can select more than one option:
&#60;INPUT TYPE=checkbox VALUE=1 NAME=myData[]&#62;
&#60;INPUT TYPE=checkbox VALUE=2 NAME=myData[]&#62;
&#60;INPUT TYPE=checkbox VALUE=3 NAME=myData[]&#62;
or
&#60;SELECT NAME=myData[] MULTIPLE&#62;
will appear in the PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Readers are probably aware that you can pass an array to a script from a HTML form.</p>
<p>For instance, if you want to pass multiple checkbox items, or data from a SELECT where the user can select more than one option:</p>
<p>&lt;INPUT TYPE=checkbox VALUE=1 NAME=myData[]&gt;<br />
&lt;INPUT TYPE=checkbox VALUE=2 NAME=myData[]&gt;<br />
&lt;INPUT TYPE=checkbox VALUE=3 NAME=myData[]&gt;</p>
<p>or</p>
<p>&lt;SELECT NAME=myData[] MULTIPLE&gt;</p>
<p>will appear in the PHP Superglobal $_GET/$_POST arrays as an array:</p>
<p>$_GET['myData'] or $_POST['myData']</p>
<p>What users may not know is that you can also pass a multi-dimensional array from a form. This is particularly handy if your form is dynamically created with a variable input names.</p>
<p>For instance, if you want to create a checkbox that a user can tick and then add data that is associated with that checkbox.</p>
<p>Say you have a property website, and you allow a seller to specify that a property is close to the airport (checkbox) and then allow the seller to specify the distance in km and miles from the airport using 2 SELECTs.</p>
<p>Your checkbox would form the first layer of the array:</p>
<p>&lt;INPUT TYPE=checkbox VALUE=1 NAME=myData[x]&gt;</p>
<p>Where x = discreet data that refers to a property being &#8216;close to an airport&#8217;.</p>
<p>Your 2 SELECTS would then be:</p>
<p>&lt;SELECT NAME=myData[x][0]&gt;<br />
&lt;SELECT NAME=myData[x][1]&gt;</p>
<p>This will place the multi-dimensional array $myData in either $_GET or $_POST, which you can use like any other multi-dimensional array.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2008/02/multidimensional-arrays-in-form-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE 6 and 7 Imagemap crash issue</title>
		<link>http://www.nightbluefruit.com/blog/2007/12/ie-6-and-7-imagemap-crash-issue/</link>
		<comments>http://www.nightbluefruit.com/blog/2007/12/ie-6-and-7-imagemap-crash-issue/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 11:21:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=12</guid>
		<description><![CDATA[Imagemaps are a bit old hat these days, but they still have their uses and this IE bug can be a real killer.
If you dynamically create an Imagemap using Javascript, IE has a problem with polygon areas that have different number of co-ordinates. Basically, IE will crash if you click on an area that has [...]]]></description>
			<content:encoded><![CDATA[<p>Imagemaps are a bit old hat these days, but they still have their uses and this IE bug can be a real killer.</p>
<p>If you dynamically create an Imagemap using Javascript, IE has a problem with polygon areas that have different number of co-ordinates. Basically, IE will crash if you click on an area that has fewer co-ordinates than a previous area.</p>
<p>To get around this, don&#8217;t use DOM element properties to create your Imagemap:</p>
<p>Don&#8217;t use:</p>
<p>map_image.isMap = &#8216;ismap&#8217;;<br />
map_image.useMap = &#8216;#layer0&#8242;;</p>
<p>etc</p>
<p>Put your IMG tag inside a SPAN instead, and update it using the innerHTML property.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2007/12/ie-6-and-7-imagemap-crash-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox, Imagemaps and Float DIVs</title>
		<link>http://www.nightbluefruit.com/blog/2007/12/firefox-imagemaps-and-float-divs/</link>
		<comments>http://www.nightbluefruit.com/blog/2007/12/firefox-imagemaps-and-float-divs/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 22:59:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=11</guid>
		<description><![CDATA[Here is some curious Firefox behaviour I&#8217;ve recently discovered. It took me several hours to figure out what was happening.
If you place an imagemap inside a DIV in Firefox, it works fine.
However, if you then float that DIV, Firefox moves the image with the DIV, but leaves behind the imagemap where the DIV would have [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some curious Firefox behaviour I&#8217;ve recently discovered. It took me several hours to figure out what was happening.</p>
<p>If you place an imagemap inside a DIV in Firefox, it works fine.</p>
<p>However, if you then float that DIV, Firefox moves the image with the DIV, but leaves behind the imagemap where the DIV would have been had it not been floated.</p>
<p>IE doesn&#8217;t repeat this behaviour. It moves the imagemap with the image. I&#8217;m not sure which is the standardised behaviour, but if you want to place imagemaps in columns on a page, and you want this to work in Firefox, you have to use tables. DIVs won&#8217;t cut it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2007/12/firefox-imagemaps-and-float-divs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What form am I?</title>
		<link>http://www.nightbluefruit.com/blog/2007/10/what-form-am-i/</link>
		<comments>http://www.nightbluefruit.com/blog/2007/10/what-form-am-i/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 22:17:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=9</guid>
		<description><![CDATA[Its nice to have a single piece of Javascript that you can use on all the forms you have in an application, but it can be difficult between browsers to get your Javascript to recognise what form it has been called from.
Here&#8217;s a simple solution.
Give your form a numeric ID. That way, you can pass [...]]]></description>
			<content:encoded><![CDATA[<p>Its nice to have a single piece of Javascript that you can use on all the forms you have in an application, but it can be difficult between browsers to get your Javascript to recognise what form it has been called from.</p>
<p>Here&#8217;s a simple solution.</p>
<p>Give your form a numeric ID. That way, you can pass the ID to a function that can then do whatever it is you need to do with the form.</p>
<p>For example:</p>
<p>&lt;FORM ID=100 NAME=registration_form ACTION=index.php METHOD=get&gt;</p>
<p>&lt;INPUT TYPE=text NAME=user_name&gt;</p>
<p>&lt;INPUT TYPE=button VALUE=submit_button onClick=&#8217;submitMe(100);&#8217;&gt;</p>
<p>&lt;/FORM&gt;</p>
<p>Your submitMe() function then looks like this:</p>
<p>function submitMe(formID) {</p>
<p>document.getElementById(formID).submit;</p>
<p>}</p>
<p>And if you have more than 1 form in a page, you can use different numeric IDs for each form: 100,101,102 etc</p>
<p>Finally, you can of course give your form a contextual name as well as an numeric ID (eg. &#8220;registration_form&#8221;) so that you can also access the form components and values through the DOM, ie:</p>
<p>var userName = document.registration_form.user_name.value;</p>
<p>Sweet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2007/10/what-form-am-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
