<?xml version="1.0" encoding="ISO-8859-1" ?> 
<!--  generator="meddle/3.0" -->
<rss version="2.0">
	<channel>
		<title>meddle weblog v.3</title>
		<link>http://meddle.dzygn.com</link>
		<description>Weblog about dhtml and associated technologies. Also personal thoughts and photography.</description>
		<language>english</language>
		<copyright>Copyright 2001-2004 Sergi Meseguer</copyright>
		<lastBuildDate>Fri, 04 Jul 2008 10:00:10 -0400</lastBuildDate>
		<docs>http://backend.userland.com/rss</docs> 
		<generator>meddle mysql2php2rss tool v3</generator>
		<managingEditor>meddle@dzygn.com (Sergi Meseguer)</managingEditor> 
		<webMaster>meddle@dzygn.com (Sergi Meseguer)</webMaster>
		<image>
			<url>http://meddle.dzygn.com/avatarv3.jpg</url>
			<title>meddle weblog v3</title>
			<link>http://meddle.dzygn.com/eng/weblog/</link>
		</image>
		<item>
			<title>DHTML is fashionable</title>
			<link>http://meddle.dzygn.com/eng/weblog/dhtml.trend/</link>
			<description><p>New year, new life. New year, new trend. So we're so happy to welcome 2005 with such kind of news. Apparently, a lot of people is betting for DHTML to solve navigation and usability problems or just developing dynamic applications using this technology instead of Flash. Lets see some examples. </p>
<ul>
<li>this amazing application to navigate <a href="http://map.search.ch/">Switzerland maps</a>, includes zoom effects. No, seriously, no Flash.</li>
<li>Google has recently developped two interesting projects. <a href="http://gmail.google.com/gmail/help/about.html">Gmail</a>    allows us to check the number of incoming emails without reloading the page (among many other features), while <a href="http://www.google.com/webhp?complete=1">Google Suggest</a> shows in real time (while you're writting you're own terms to search) the most likely matches and their number of found documents, so you dont have to type the whole sentence. These two use the <a href="http://developer.apple.com/internet/webcontent/xmlhttpreq.html">XMLHttpRequest</a> object, that allows to make server calls without reloading the page. Here you can see <a href="http://blog.outer-court.com/archive/2004_12_11_index.html#110276834555565307"> how suggest works</a> exactly. We can expect more brilliant stuff by Google soon, since Mr. Boodman <a href="http://youngpup.net/2004/1108055444">has moved there</a>, so far just to improve Blogger.</li>
<li>Remote scripting is not new. So far there were other techniques such as the <a href="http://developer.apple.com/internet/webcontent/iframe.html">iframe working as buffer</a>, getting data from a page and writting to a layer, or the trick of using an image to add scripts, or the less known yet elegant method of Dan Pupius (I dont remember the link), that was an improvement on the <a href="http://www.dotvoid.com/view.php?id=13">pioneer</a>. Even the now trendy XMLHttpRequest is something quite old (just that now is more widely supported). We already had the <a href="http://webfx.eae.net/dhtml/xmlextras/xmlextras.html">WebFX</a> scripts and the <a href="http://sarissa.sourceforge.net/doc/overview-summary.html#overview">Sarissa API</a>. So to stop boring with technical words, lets just see a small summary with definitions and examples in this <a href="http://jpspan.sourceforge.net/wiki/doku.php?id=javascript:xmlhttprequest">sourceforge wiki</a>.</li>
<li>also interesting this <a href="http://www.squarefree.com/shell/">Javascript Shell</a>, that allows us to make DOM tests using a commandline tool. </li>
<li>it will also become trendy the concept of unobtrusive DHTML, by which script is a simple improvement on usability and never a requisite not the mechanism to add content. There are several examples, like the excellent <a href="http://slayeroffice.com/code/fancy_menu/">fancy menu</a>, a flash-like menu based on html lists, just like my last modification of an Aaron's script (this time was Accelimation) to make the menu for <a href="http://pixilate.com/">pixilate</a>, or any <a href="http://phrogz.net/JS/ul2menu/index.html">other</a> <a href="http://www.gazingus.org/html/Using_Lists_for_DHTML_Menus.html">good</a> <a href="http://www.kryogenix.org/code/browser/aqlists/">unobtrusive</a> <a href="http://www.kryogenix.org/code/browser/sorttable/">scripts</a></li>
</ul>
<p>OK, before closing, only to add that this year will be full of projects DHTML related. Either local (we have something going on with <a href="http://kusor.net">Pedro</a> and other close bloggers) or international (<a href="http://13thparallel.com/">13thparallel changes format</a>, <a href="http://dojotoolkit.org/">Dojo Toolkit</a>, etc). More soon.</p></description>
			<pubDate>2005-01-17 19:30:58</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/dhtml.trend/</guid>
		</item>
		<item>
			<title>Free software for daily use</title>
			<link>http://meddle.dzygn.com/eng/weblog/free.soft/</link>
			<description><p>There's been a lot of excitement lately about the new release of the difinitive version of <a href="http://www.mozilla.org/products/firefox/">Mozilla Firefox</a>. No doubt it's a great piece of software and an excellent alternative to Internet Explorer. Besides its security, tabbed navigation and speed, what I really like (more than <a href="http://www.opera.com/">Opera</a>, the other big alternative) is the huge amount of extensions that not only allow us to configure the look but behaviour. I use the following extensions:</p>
<ul>
<li><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&amp;id=158&amp;vid=1345">Tabbrowser Preferences 1.1.1</a> to enhace tabbed navigation</li>
<li><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&amp;id=60&amp;vid=645">Web Developer 0.8</a> (based in the previous <a href="http://placenamehere.com/pnhtoolbar/">PNH Toolbar</a>, which is much improved here) to anything web related, like disabling styles, outline tables, edit the CSS of a page on the fly, etc. </li>
<li><a href="http://greasemonkey.mozdev.org/">greasemonkey</a> allows us to add scripts to pages to modify their behaviour. For instance to make all url <a href="http://downloads.mozdev.org/greasemonkey/linkify.user.js">linkable</a>, or <a href="/v3/js/killblank.user.js">destroy</a> the famous target _blank</li>
<li><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&amp;id=10&amp;vid=664">Adblock</a> blocks unwanted elements (for instance, banners) using regular expressions (to block specific sites, folders, etc.)</li>
<li><a href="http://pagerankstatus.mozdev.org/">Page Rank Status</a> adds a little icon in your status bar that shows the page rank of that visited site</li>
<li><a href="http://ieview.mozdev.org/">ieview</a> opens that page in  Internet Explorer through the contextual menu (so we don't even have to copy and paste)</li>
<li><a href="https://addons.update.mozilla.org/extensions/moreinfo.php?id=173&amp;vid=331&amp;category=&amp;page=releases">Gmail Notifier</a> to be aware of our Gmail box</li>
<li><a href="http://www.bloglines.com/help/firefox">Bloglines Toolkit</a> to be aware of changes in our list of sindicated news</li>
<li><a href="http://forecastfox.mozdev.org/">ForecastFox</a> shows us the weather outside, and a forecast for next days</li>
</ul>
<p>Another big news has been the release of the difinitive version of <a href="http://www.mozilla.org/projects/thunderbird/">Mozilla Thunderbird</a>, an excellent email manager. It also has several <a href="http://texturizer.net/thunderbird/extensions/">extensions</a>, but in this case I use it as is.</p>
<p>And finally, I'd recommend the use of a good antivirus software like <a href="http://www.grisoft.com/">Grisoft AVG</a>, which also happens to be free. In this new version (AVG 7.0 Free) there's a tool to associate the antivirus to your email manager, but htis time it works with Thunderbird too. Perfect.</p></description>
			<pubDate>2004-12-22 08:26:52</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/free.soft/</guid>
		</item>
		<item>
			<title>FLACCESS update</title>
			<link>http://meddle.dzygn.com/eng/weblog/accessible.flash.v1.3/</link>
			<description><p>Just releasing version 1.3, that includes some changes respect the original explaination to understand <a href="/eng/weblog/accessible.flash/">how to use the script</a>, parameters, etc (changes have been updated there too):</p>
<ul>
<li>There is a "lite" version too, that works with DOM browsers only and will insert the flash on the fly (no delay option in this lite version)</li>
<li>Flash object id now has to be passed in the path string (i.e.: "fl1,in,out"). Since lite version will only work in DOM browsers, it will only need a flash id and the parent id, not the complete path (that we needed for ns4 to work). </li>
<li>The id will be appended to the object and embed elements. To avoid duplication between them, embed will use the id in the name and "name"+id in its id.</li>
<li>The path string will also be automatically passed as a flashvar, so we can retrieve it from javascript.</li>
<li>Parent element will get same size as flash object when it's inserted (to adjust page flow)</li>
</ul>
<p>Get the last <a href="/v3/js/flaccess.v1.3.rar">compressed file</a> with examples to see it working.</p></description>
			<pubDate>2004-12-09 10:15:38</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/accessible.flash.v1.3/</guid>
		</item>
		<item>
			<title>I want my window, dammit! (or how to destroy target _blank)</title>
			<link>http://meddle.dzygn.com/eng/weblog/destroy.target/</link>
			<description><p>I've always thought user should be able to choose where to load new documents from links. I say you as developer can use a cookie and provide that option if user wants to, but only if user wants to (see my preferences form at the end of page). A lot of other people think the best option is not letting them think and open everything in a new window. I hate those situations. What if i want to stay in my window? Hey, if i like your site i'll be back... Anyway, they insist in using target _blank. Well, all that's finished. Bye bye target _blank. Wanna know how? Keep reading...</p></description>
			<pubDate>2004-12-09 04:38:02</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/destroy.target/</guid>
		</item>
		<item>
			<title>Article on unobtrusive DHTML</title>
			<link>http://meddle.dzygn.com/eng/weblog/disenorama.article/</link>
			<description><p><a href="http://www.disenorama.com/">diseņorama</a> has just released an article on DHTML and how to program web pages keeping accessibility in mind, which is lately called <a href="http://www.disenorama.com/articulos/dhtml/dhtml_no_intrusivo.htm">unobtrusive DHTML</a>. Ah well, written by me, ok, if you can read spanish (translation will come eventually if I have the time) and want to leave any comment I'll appreciate. I'll be posting examples here anyway, also as time permits.</p></description>
			<pubDate>2004-12-01 17:43:40</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/disenorama.article/</guid>
		</item>
		<item>
			<title>How to add line numbers to code blocks</title>
			<link>http://meddle.dzygn.com/eng/weblog/line.numbers/</link>
			<description><p>I've just discovered how to add line numbers to code blocks inside <code>pre</code>formatted text. I've used a javascript function that loops through all <code>pre</code> elements, and calls a regular expression that returns the number of lines in that block. Then, using innerHTML i just add a <code>div</code> containing the line numbers and style it using CSS. The javascript, that is part of a namespace (an object literal to provide encapsulation) is something like this:</p>
<pre><code>
// adds line numbers to code sections:
numberCodeTags : function(){
	var PRE = document.getElementsByTagName('pre'); 
	var nl = /\n+/mg;
	for (var i = 0; i &lt; PRE.length; i++) {
		var t = PRE[i].innerHTML;
//mozilla/ff cannot select all lines of a code element 
//that is inside a pre element:
		if(document.addEventListener && !window.opera) {
			Extras.getCodeText(PRE[i]);
		}
			
//will only work in mozilla+op (IE replaces \n by a space so its useless):
		var NL = Extras.getMatchArray(t,nl);
		if(NL) {
		var numeros = "";
		for (var lineas = 1; lineas &lt; NL; lineas++) 
		numeros += lineas +"\n";
		PRE[i].innerHTML += "&lt;div class='lines'&gt;"+numeros+"&lt;/div&gt;";
		}
	}
},
	
// matches a regexp to a string, returns array
getMatchArray : function(myString,myRegExp){
	return myString.match(myRegExp).length;
},

// FF  hack to make easier select all lines of a 
//code element that is inside a pre element:
getCodeText : function(obj){
	var color = CSS.getStyle(obj.firstChild,"color");
	var bgcolor = CSS.getStyle(obj.firstChild,"backgroundColor");
	if(bgcolor=="transparent") bgcolor="white";
	obj.onmouseover = function(){
		obj.firstChild.style.color = bgcolor;
		obj.firstChild.style.backgroundColor = color;
	}
	obj.onmouseout = function(){
		obj.firstChild.style.color = color;
		obj.firstChild.style.backgroundColor = bgcolor;
	}
},
</code></pre>
<p>CSS could be something similar to the following lines:</p>
<pre><code>
pre	{
	position:		relative;
	color: 			#913117;
	padding: 		0px 1em 0px 1em;
	margin: 		0px;
	font-family:		Courier, monospace; 
	font-size:		1em;
	}
code	{
	font-variant: 		normal;
	color: #913117;
	}
pre code	{
	position:		relative;
	top:			0px;
	left:			1.2em;
	font-variant: 		normal;
	color: 			#913117;
	padding: 		0px;
	margin: 		0px;
		}
pre .lines	{
	position:		absolute;
	top:			1em;
	left:			0px;
	width:			1.2em;
	padding: 		0px;
	margin: 		0px 1.2em 0px 0px;
  	background: 		#913117;
	color: 			white;
	}
</code></pre>
<p>This technique seems to work in Mozilla and Opera only. IE replaces line feeds with spaces, so I simply ignored it. All other browsers degrade.</p>
<p>As stated in forst comment, Mozilla has a bug that doesnt let you select a block of code that is inside a preformated text. I tried to add a background color (only in Mozilla) onmouseover, this way block size is better seen. Apparently, if we start selection inside the free space outside the code block (the white space between numbers and code) you can select the code easily. </p></description>
			<pubDate>2004-11-29 19:56:46</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/line.numbers/</guid>
		</item>
		<item>
			<title>Some tags allowed in comments</title>
			<link>http://meddle.dzygn.com/eng/weblog/allow.code/</link>
			<description><p>Yesterday I finished a modification in my content management system, thanx to a lot of help from <a href="http://www.pupius.co.uk/" title="da man">Dan</a> to solve a regular expression problem. Now users can add the following tags to their comments: <code>p</code>, <code>a</code>, <code>em</code>, <code>strong</code>, <code>pre</code>, <code>code</code>. </p>

<p>I recommend using the paragraph tag to open and close text blocks, text will show up nicely. If you want to add code inline (inside a paragraph) simply use the <code>code</code> tag, the script will handle the entities. If you want the code block to respect line breaks you will need to use <code>&lt;pre&gt;&lt;code&gt;your code&lt;/ code&gt;&lt;/pre&gt;</code> outside the paragraph (<code>pre</code> acts as block). Any other code or tag not inside <code>code</code> tags will be destroyed. </p></description>
			<pubDate>2004-11-18 07:25:07</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/allow.code/</guid>
		</item>
		<item>
			<title>Bookmarklet to enlarge your ... textareas</title>
			<link>http://meddle.dzygn.com/eng/weblog/textarea.increase/</link>
			<description><p>Just made a little bookmarklet that increases the size of all textarea in a page (or inner pages if insidee a frameset) to 450px x 250px. You can store it in your favorites and call it in your content management systems or that site that only gives you 100px to write some message. To run it, just follow <a href="javascript:function grow(w){var areas=w.getElementsByTagName('textarea');for(var i=0;i<areas.length;i++){areas[i].style.width='450px';areas[i].style.height='250px';}}function callme(){if(frames.length>0){for(var x=0;x<frames.length;x++){grow(frames[x].document);}}else{grow(document);}}callme();">this link</a>. I'll use it a lot in my phpMyAdmin copy. As alwys, if you like it, there's more bookmarklets and scripts in the <a href="/eng/tools/">tools section</a>.</p></description>
			<pubDate>2004-11-17 07:40:47</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/textarea.increase/</guid>
		</item>
		<item>
			<title>Introducing FLACCESS: flash keeping accessibility</title>
			<link>http://meddle.dzygn.com/eng/weblog/accessible.flash/</link>
			<description><h4>Detecting flash: previous methods</h4>
<p> I have been trying to find a method of detecting, on the server, the
presence of the flash plugin version installed in the browser.  Even
though it would be very easy for macromedia to add the version variable
to to the HTTP_ACCEPT, they force us to use clientside languages to do
so. Having that option would allow us to do content negotiation in
server or simply add the <a href="http://www.alistapart.com/articles/flashsatay/">flash satay</a> method safely. The main problem
with that method is that browsers with old plugins will load the object
(thus not the alternate content) but will not understand the flash, and
it cannot do streaming, although we can use a launcher for that, as in <a href="/eng/weblog/flash.launcher/">my previous attempt</a>.
Besides, some users have told me that the launcher method  is not
flexible enough (you cannot pass variables to flash) and it crashes in
some browsers (like my Opera 7.23). These are the reasons that moved me
to follow a different path. </p>
<h4>Concept</h4>
<p>The basic idea is similar to the <a href="http://www.mikeindustries.com/blog/archive/2004/10/sifr-2.0-release-candidate" title="excellent script">sIFR</a>  concept: we have the alternate
content somewhere in our html, then a script detects the plugin's
version and if its ok it replaces the alternate content with the flash
object. The advantge of this method is that unlike 99% of the other
methods, if the browser doesn't have javascript or cannot load the flash
object the alternate content remains in the html, so accessibility is
high. In other methods, javascript writes both the flash object and the
alternate content to the document, but if javascript is disabled neither
are accessible. So lets get started...</p></description>
			<pubDate>2004-11-10 13:23:36</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/accessible.flash/</guid>
		</item>
		<item>
			<title>Inserting Flash with accessibility in mind</title>
			<link>http://meddle.dzygn.com/eng/weblog/flash.launcher/</link>
			<description><p>Outdated method, replaced by <a href="/esp/weblog/accessible.flash/">the newer one</a>. Just keep it here for archive purposes.</p>
<h4>Why</h4>
<p>I've been doing a website lately that has to be accessible, but also has a menu based in flash. 
As I never used flash before I started to look for accessibility issues with flash and discovered nearly 
no one gives a shit about alternate contents, but worst, they insert their movies using javascript to detect flash 
version. This represents an accessibility problem since users that dont have javascript enabled wont be able to 
insert the object nor read the alternate content (if any).</p></description>
			<pubDate>2004-10-25 12:00:00</pubDate>
			<guid isPermaLink="true">http://meddle.dzygn.com/eng/weblog/flash.launcher/</guid>
		</item>
	</channel>
</rss>