posted on: 27 September 2010
filed under:linux @ 10:47:52 comments(0)
Two things. First: I have upgraded from Hardy Heron to Lucid Lynx and it all works very nicely, except a minor bug that has something to do with visual effects, the bonobo server and the screensaver...I'm not using a screen saver and the problem is gone. I upgraded, probably a new install from the CD would solve the problem completely, but I don't mind, it's fine as it is.
The second thing: I thought my web site was written in XHTML 1.0 Strict (it validates as such) but I found out that, since I'm serving pages with a MIME type of text/html, I'm not really using XHTML (HTML5)...
Read this: Dive Into HTML5
tags: ubuntu programming html5
posted on: 17 September 2009
filed under:webdesign @ 10:37:04 comments(0)
“ Dive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. I shall publish Drafts periodically, as time permits. Please send feedback. ”
Dive Into HTML5 by Mark Pilgrim
tags: programming html5
posted on: 20 July 2009
filed under:webdesign @ 10:27:44 comments(0)
“ The web is designed to be consumed by humans, and much of the rich, useful information our websites contain, is inaccessible to machines. People can cope with all sorts of variations in layout, spelling, capitalization, color, position, and so on, and still absorb the intended meaning from the page. Machines, on the other hand, need some help. ”
tags: programming rdfa
posted on: 03 July 2009
filed under:php @ 09:54:03 comments(0)
PHP Quick Profiler is a small tool (think Firebug for PHP) to provide profiling and debugging related information to developers without needing them to add a lot of programmatic overhead to their code:
PQP
tags: debugging programming
posted on: 07 February 2009
posted on: 02 February 2009
filed under:webdesign @ 19:57:07 comments(0)
A list of resources on HTML 5 by Cameron Moll :
12 resources for getting a jump on HTML 5
tags: programming html 5
posted on: 28 November 2008
filed under:webdesign @ 12:40:02 comments(0)
Via an article on Particle Tree:
tags: programming
posted on: 16 October 2008
filed under:javascript @ 16:18:23 comments(0)
A Javascript function to check if a variable is empty:
Feelin' Empty
tags: programming
posted on: 22 September 2008
posted on: 06 September 2008
filed under:webdesign @ 09:42:03 comments(0)
On Chris Shiflett's blog:
Inspecting and Hacking HTTP
Interesting use of telnet and lots of links to different HTTP debugging (and not only) tools.
tags: programming http
posted on: 07 July 2008
filed under:javascript @ 10:36:55 comments(0)
“ Overall, binding in JavaScript is not a difficult concept, but it is far too often ignored or glossed over by JavaScripters, which leads to confusion.”
Getting Out of Binding Situations in JavaScript
tags: programming
posted on: 07 June 2008
filed under:javascript @ 10:36:22 comments(0)
Javascript code to turn text into a title capitalizing the first letter of each word:
To Title Case
tags: programming
posted on: 19 May 2008
filed under:javascript @ 18:10:03 comments(0)
“ Every JavaScript file that needs to be loaded is a new connection to the server, and every connection to the server means more data; all this occurs before the end user even gets to interact with the page. Thankfully, there is a better way to do this - loading pieces of your web application as the user wants them.”
Improve Your Page Performance With Lazy Loading
tags: programming lazy loading
posted on: 20 April 2008
filed under:javascript @ 10:31:41 comments(0)
After almost three weeks I found the solution to the Javascript Flickr badge...
After Roger Johansson's help I kept looking around and ended up checking out
the Flickr API (I knew about it but I didn't think of it
as the logical solution until then..). Anyway, I soon found out that I could get an XML document back with all the info needed to build a flickr badge.
But...XMLHttpRequest cannot do cross scripting (XSS) because of security reasons and my php set up did not allow me to parse XML or send a
call with XML-RPC. I still didn't want to have to change much to attain the result I was looking for.
Then I found an article on Vitamin by Cameron Adams of The Man in Blue.
I could get a response in JSON, no XSS problems and still be able to parse it with plain old Javascript.
I still had some problems and Cameron (thanks again) answered a question I asked him which pointed me in the right direction (code lines that shouldn't be broken marked with >>) :
function jsonFlickrApi(rsp){
if (rsp.stat != 'ok') return;
var div = document.createElement('div');
div.setAttribute('id','photos_wrapper');
var div2 = document.createElement('div');
div2.setAttribute('id','photos');
for (var i=0; i<rsp.photos.photo.length; i++){
var p = rsp.photos.photo[i];
var a = document.createElement('a');
a.setAttribute('href','http://www.flickr.com/photos/13067897@N00/'+p.id+'/');
a.setAttribute('title',p.title);
var img = document.createElement('img');
img.setAttribute('src','http://farm'
+p.farm+'.static.flickr.com/'+p.server+'/' >>
+p.id+'_'+p.secret+'_t.jpg');
img.setAttribute('alt',p.title);
a.appendChild(img);
div2.appendChild(a);
}
var target = document.getElementById('badge');
if(!target) return;
div.appendChild(div2);
target.appendChild(div);
}
function call_flickr(){
var newScript = document.createElement('script');
newScript.setAttribute('src','http://api.flickr.com/services/rest/?method >>
=flickr.people.getPublicPhotos&api_key=xxxx& >>
user_id=idididi&per_page=8& >>
page=1&format=json&callback=jsonFlickrApi');
var obj = document.getElementById('write');
if(!obj) return;
obj.appendChild(newScript);
}
On the page I now have two empty, unstyled divs. The first has an ID of write and
the other of badge. I build the container divs with Javascript and then append the result inside the badge div.
It validates and now, if Javascript is disabled, I just get nothing which is exactly as it should be!!
tags: programming flickr badge
posted on: 16 April 2008
filed under:css @ 09:38:31 comments(0)
A series on Authentic Boredom :
“ Introducing “The Highly Extensible CSS Interface”, a four-part series of how-to's and savvy conversation to be published in the coming weeks, with the first article debuting this week. The phrase “highly extensible” is in reference to designing and coding interfaces that are flexible enough to adapt in ways the designer or developer may not foresee when handing off coded templates, while still retaining the overall aesthetic integrity of the layout.”
The Highly Extensible CSS Interface ~ The Series
tags: layout programming
posted on: 09 April 2008
filed under:javascript @ 15:37:02 comments(0)
I have done a bit more testing and I found out that on Firefox the Javascript call returns only <img> and <a> but on IE6 it still returns <td>..I should have been more attentive. That's why the images end up outside the DIVs.
tags: programming flickr badge
posted on: 07 April 2008
filed under:javascript @ 19:59:02 comments(0)
I'm still looking for a solution to the Flickr badge “problem”. I sent an email to Roger Johansson of 456 Berea St. and I got an answer back extremely fast. I already thanked him and I'm going to do it again: thanks!
He pointed me to this post by Chris Heilmann of Wait till I come. It's definitely interesting but I'm happy with the simple Javascript call I got from Flickr and I'm just trying to figure out why IE puts the images outside the DIV.
I did some more tests, actually coding Javascript on the page old style:
<script type="text/javascript">
document.write('<div id="photos_wrapper">');
document.write('<div id="photos">');
document.write('<script type="text/javascript"
src="http://www.flickr.com/badge_code_v2.gne?..."><\/script>');
document.write('</div>');
document.write('</div>');
var div = document.getElementById('photos');
alert(div.firstChild.src);
</script>
It does not validate so I'm doing it just to test. The alert at the end of the script gives back the correct URI or script if I do alert(div.firstChild.NodeName) but the images are still OUTSIDE the DIVs in IE6...or, at least, they appear
to be.
Using the DOM to build the Javascript external call to Flickr :
<script type="text/javascript">
document.write('<div id="photos_wrapper">');
document.write('<div id="photos">');
document.write('</div>');
document.write('</div>');
var div = document.getElementById('photos');
var js = document.createElement('script');
js.setAttribute('type','text/javascript');
js.setAttribute('src','http://www.flickr.com/badge_code_v2.gne?...');
div.appendChild(js);
alert(js.parentNode.id);
</script>
The result given by the alert at the end is correct (photos) but in Firefox it does not show the pictures the first time it loads the
page (the Javascript call doesn't fire, I suppose) and doing a refresh causes the Javascript call to Flickr to take over the document making it blank and getting stuck on a bad URI call. On IE6 it just does not show the pictures (the Javascript call doesn't fire, I suppose).
Weird....
I also noticed that basically everyone that uses the Flickr badge as I do has the same “problem”, but it doesn't seem to bother them.
tags: programming flickr badge
posted on: 04 April 2008
filed under:javascript @ 10:35:02 comments(0)
On Javascript kit I found this tutorial: external JavaScript and php. At this point, I really thought I had the solution.
So, I rewrote the php function accordingly:
<?php
header("content-type: application/x-javascript");
echo "document.write('<div id=\"photos_wrapper\">');";
echo "document.write('<div id=\"photos\">');";
echo "document.write('<script type=\"text/javascript\" src=\"http://www.flickr.com/badge_code_v2.gne?...\"></script>');";
echo "document.write('</div>');";
echo "document.write('</div>');";
?>
then placed a link to the external file inside the page where the badge is supposed to be:
<script src="functions/flickr.php" type="text/javascript"></script>
In Mozilla Firefox everything is all right, it validates and...IE puts the images OUTSIDE the div!! Why? Have no idea...

The simple fact that is possible to have some kind of data exchange between php and Javascript is very interesting in itself and I had never read anything about it before. I definitely learned something but I still haven't found the solution to the problem...
tags: programming flickr badge
posted on: 03 April 2008
filed under:javascript @ 10:19:04 comments(0)
Still trying to get my head around the same Javascript problem. I tried the DOM (my first idea, actually, but I didn't want to have an extra div to use as a hook):
function flickr_badge(){
var target = document.getElementById('photos_hook');
if(!target) return;
var div = document.createElement('div');
div.setAttribute('id','photos_wrapper');
var div2 = document.createElement('div');
div2.setAttribute('id','photos');
var js_s = "<script type='text/javascript'
src='http://www.flickr.com/badge_code_v2.gne?...'></script>";
div2.appendChild(js_s);
div.appendChild(div2);
target.appendChild(div);
}
and using innerHTML :
function flickr_badge(){
var target = document.getElementById('photos_hook');
if(!target) return;
var div = document.createElement('div');
div.setAttribute('id','photos_wrapper');
var div2 = document.createElement('div');
div2.setAttribute('id','photos');
var js_s = "<script type='text/javascript'
src='http://www.flickr.com/badge_code_v2.gne?...'></script>";
div2.innerHTML = js_s;
div.appendChild(div2);
target.appendChild(div);
}
with the same result: the Javascript call to Flickr takes over and rewrites the whole page, I get only unstyled photos and a loopy request to connect with flickr...
I also tried embedding the Javascirpt directly in the page :
<script type="text/javascript">
document.write('<div id="photos_wrapper">');
document.write('<div id="photos">');
document.write('<scr'+'ipt type="text/javascript"
src="http://www.flickr.com/badge_code_v2.gne?...."></scr'+'ipt>');
document.write('</div>');
document.write('</div>');
</script>
I had to break the <script> tag in two pieces, otherwise I get a Javascript unterminated string error (script tag nested inside another one), it works but it doesn't validate. Basically, so far, most of my possible solutions don't work and what works doesn't validate.
tags: programming flickr badge
posted on: 02 April 2008
filed under:javascript @ 14:27:21 comments(0)
Beside the lack of web standards attention, I had another problem with the Flickr badge: with Javascript disabled I ended up with a rectangular empty div, 76px height, just sitting there..
I looked around on Google for a solution, at first I thought I could check if Javascript was enabled with php. It turns out that it's pretty easy to check if the browser has Javascript abilities but not if it's actually enabled. I know that php is a server side language and Javascript mostly client side, so it's not possible to call a php function from a Javascript script (except maybe using XMLHttpRequest but I did't even go there).
After trying various unsuccessful combinations I finally figured it out and I wrote the php function so that it writes what I need using Javascript:
<?php
function flickr(){
echo "<script type=\"text/javascript\">\n";
echo "document.write('<div id=\"photos_wrapper\">');\n";
echo "document.write('<div id=\"photos\">');\n";
echo "</script>\n";
echo "<script type=\"text/javascript\" src=\"http://www.flickr.com/badge_code_v2.gne?....."></script>\n";
echo "<script type=\"text/javascript\">\n";
echo "document.write('</div>');\n";
echo "document.write('</div>');\n";
echo "</script>\n";
}
?>
Now, if Javascript is enabled, all is good, otherwise just no empty divs and no flickr badge...I thought... but NO, now it doesn't validate because since there are three <script> “blocks” the parser sees an opening and ending mismatch of the divs ..So, I'm back where I started. More when I fix it..
tags: programming flickr badge
posted on: 17 February 2008
posted on: 22 October 2007
filed under:javascript @ 19:24:32 comments(0)
A post about XMLHttpRequest via Stringify :
Re-inventing XMLHttpRequest
Stringify has a new look, very nice.
tags: xmlhttprequest programming
posted on: 16 October 2007
filed under:php @ 19:02:31 comments(0)
An article on Digital Web Magazine about building forms using php:
Building a Bulletproof Contact Form with PHP
Nothing new but accurate and simple, good to have a link to for reference.
tags: forms programming
posted on: 10 May 2007
filed under:webdesign @ 09:01:22 comments(0)
tags: programming
posted on: 02 May 2007
posted on: 30 April 2007
filed under:php @ 19:21:02 comments(0)
tags: programming
posted on: 30 April 2007
posted on: 28 April 2007
filed under:javascript @ 09:24:08 comments(0)
“ Whether or not your JavaScript is maintainable often seems to be relative to the task you're trying to accomplish. You can follow best practices, or not, and sometimes you'll be fine either way. Nevertheless, in this article, we'll demonstrate seven techniques you can add to your daily code writing habits to make you a better programmer.”
Seven JavaScript Techniques
tags: programming
posted on: 24 April 2007
filed under:webdesign @ 19:04:26 comments(0)
“..an excellent cross-platform, language-agnostic checksheet of common software security risks...a brief summary of each of the 19 sins, along with a count of the number of vulnerabilities I found in the Common Vulnerabilities and Exposures database for each one.”
Sins of Software Security
tags: programming security
posted on: 14 April 2007
filed under:webdesign @ 19:16:21 comments(0)
“ HTML 4.01 may be a good, stable ground for developers to stand on, but it could be better. Lots of things have changed in the way the web is used and perceived in the last eight years, but particularly from a developer perspective, we've gained an understanding of what HTML 4.01 failed at, and where it could be improved. The next generation of these technologies is arriving, and they are worth keeping an eye on. These technologies will affect everyone in the business.”
HTML5, XHTML2, and the Future of the Web
tags: programming web
posted on: 05 April 2007
filed under:webdesign @ 19:20:08 comments(0)
On A List Apart:
“ While building a browser slideshow object for a demonstration on dynamically pulling image information from a web server, I ran into difficulty with the DOM-compliant approach I had envisioned. A two-day journey into the world of XML DOM support for web browsers lay between me and a satisfactory solution. My plan was to pass an XMLHttpRequest (XHR) with the name of an image to the server, which would return, from a combination of a database and the image itself, a title for the image, a description, and all meta data stored for the image. This data would be sent in XHTML format so that the client could simply import the XML response and append it to some container elements, thus speeding up the slideshow application.”
Cross-Browser Scripting with importNode()
tags: programming xmlhttprequest
posted on: 21 March 2007
filed under:webdesign @ 19:18:37 comments(0)
On Coding Horror :
Primary Keys: IDs versus GUIDs
The GUID stays unique globally while the ID is unique only within a single table.
tags: programming databases
posted on: 15 March 2007
posted on: 10 March 2007
posted on: 01 February 2007
posted on: 31 January 2007
posted on: 28 January 2007
filed under:php @ 19:08:41 comments(0)
“ Just added a preliminary 9-block IP identification feature to Daily, my blog server to enhance commenter identity beyond name and website. Basically, what I am doing is using a privacy protecting derivative of each commenter's IP address to build a 9-block image and displaying it next the commenter's name.”
Visual Security: 9-block IP Identification
And the PHP version of it:
Visiglyphs for IP visualisation
tags: programming
posted on: 24 September 2006
filed under:javascript @ 09:47:01 comments(0)
“ In JavaScript, a function is an object; creating a function creates an object. Function objects can be a little more useful than the object literals we just discussed, though, in that they can be used as a template for new objects.”
Objectifying JavaScript
tags: programming oop
posted on: 23 September 2006
filed under:webdesign @ 18:35:02 comments(0)
“ The relationships among HTML, XML and XHTML are an area of considerable confusion on the web. We often see questions on the webkit-dev mailing list where people wonder why their seemingly XHTML documents result in HTML output. Or we're asked why an XML construct like <b /> doesn't actually close the bold tag. This article will attempt to clear up some of that confusion.”
Understanding HTML, XML and XHTML
tags: programming web
posted on: 02 September 2006
filed under:webdesign @ 10:38:03 comments(0)
I've added a printer friendly button on the studies pages. Some very simple PHP and the bit of mod_rewrite in the .htaccess file to keep the URLs clean. I also found out a way to force IE to forget the credentials used in an Apache based HTTP authentication, making log out possible (see article for details):
<script type="text/javascript">
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("msie") != -1) {
document.execCommand("ClearAuthenticationCache");
}
</script>
Adding also a redirect it's possible to have a log out button that actally acts like a proper one, except that it still prompts for a user and password window that needs to be canceled.
Tested only on Firefox 1.5.0.6 and IE6 running on Windows XP.
Some more about HTTP authentication and .htaccess:
tags: programming htaccess
posted on: 28 July 2006
filed under:javascript @ 20:58:09 comments(0)
“ This article explains closures so that a programmer can understand them - using working JavaScript code.”
Closures Are Not Magic
tags: programming
posted on: 25 July 2006
filed under:javascript @ 19:01:42 comments(0)
Object Oriented Javascript:
- Private, public and privileged members
- One core thing about JavaScript that tends to confuse people is how to get private, public and privileged members.
- Namespacing your JavaScript
- Perhaps a very uncommon approach to developing web applications that require JavaScript (but should be more common) is namespacing your scripts.
- Private Members in JavaScript
- JavaScript is the world's most misunderstood programming language. Some believe that it lacks the property of information hiding because objects cannot have private instance variables and methods. But this is a misunderstanding. JavaScript objects can have private members.
tags: programming
posted on: 22 July 2006
filed under:javascript @ 19:07:55 comments(0)
Javascript includes
calling a script from within another script
Link thumbnail
displays a small image of the destination page when hovering on a link
tags: programming
posted on: 12 July 2006
filed under:javascript @ 18:48:09 comments(0)
On Digital Web Magazine: accessible widgets for the web
When building web applications, we're working with a fairly restricted set of widgets, compared to those available for native desktop apps. The recent surge of interest in JavaScript points to a solution: we can replicate the functionality of sophisticated native widgets through some clever DOM scripting, and provide our users with exciting interfaces that bridge the gap between native apps and web apps.
tags: accessibility programming web dom
posted on: 12 July 2006
filed under:php @ 18:42:03 comments(0)
On A List Apart: automatic magazine layout
Auto-resized images are a common feature on the web now. Automating the process of resizing images saves a lot of time - it's certainly quicker than manually resizing images in Photoshop - and is a good way to manage images on a site.
Once you have ten or so images, you are better off using an AJAX based image gallery, but this script will fill the gap nicely up until that point.
tags: programming layout
posted on: 28 June 2006
filed under:css @ 18:54:21 comments(0)
On Airbag: a ruler to debug stylesheets.
tags: programming
posted on: 26 June 2006
filed under:webdesign @ 11:16:08 comments(0)
tags: programming
posted on: 21 June 2006
filed under:webdesign @ 14:19:08 comments(0)
Following yesterday's post I changed my URLs structure. Now they read:
http://sevencolors.org/post/post-title
I have written the code to keep backward compatibility: posts bookmarked with the previous structure will not be broken.
tags: programming url
posted on: 20 June 2006
filed under:webdesign @ 18:47:29 comments(0)
Graphic Push has an interesting article about URL structure
My URLs read like this:
http://sevencolors.org/post/###
which, thinking about it, only says that is a post and its number. I have noticed the spreading habit of using the title of the post and I think it makes sense. I use the post part because I have different categories. Maybe I will substitute the number with the post title..
tags: programming url
posted on: 20 June 2006
filed under:webdesign @ 16:03:45 comments(0)
On A List Apart: behavioral separation
I just posted about it but I think is good to insist.
The other article on A List Apart is about styling forms but I think that the solution proposed is too complicated. I like to keep it simpler. Also, display:inline-block does not validate.
tags: programming forms
posted on: 18 June 2006
filed under:webdesign @ 13:08:58 comments(0)
On Friendly Bit: 4 tier web development
I think of the 4 tiers as content, structure, presentation and behaviour. Almost the same. The content (or data) and the structure go together since, usually, there is (for example) a title that should be placed into a <h1> tag, chapters into <h2> etc. When it all looks readable without presentation then I add the design, using CSS. I don't like to add tags to accomodate design, I try to use only the tags necessary to the structure. The last layer (behaviour) should be unobtrusive, which basically means that is not mixed up with the structure but sits in an external file. I removed all inline Javascript calls after reading
separating behaviour and structure in 2004. The point of all this is just to build a site easy to update and apply changes to.
tags: web programming layout accessibility
posted on: 12 June 2006
posted on: 16 May 2006
posted on: 06 May 2006
filed under:php @ 10:55:29 comments(0)
DHTML is HTML that includes JavaScript code that changes the content or layout of the page in the browser without going back to the server. When you write an HTML page, you're actually writing an object tree. All the tags become objects in the JavaScript space. Using JavaScript, you can change their content, Cascading Style Sheets (CSS) styling, and location - all without ever going back to the server. DHTML is the intersection of HTML, CSS, and JavaScript:
PHP and DHTML, Part 1
tags: programming
posted on: 27 April 2006
filed under:webdesign @ 09:37:28 comments(0)
On Digital Web Magazine: Build for the Future
On 456 Berea St:
tags: web programming
posted on: 21 April 2006
posted on: 18 April 2006
posted on: 27 March 2006
filed under:javascript @ 14:03:48 comments(0)
I want to write a bookmarklet to copy a quote from another site and save it formatted with a link to it. Just to make things even easier..
tags: programming
posted on: 23 March 2006
filed under:webdesign @ 13:50:18 comments(0)
Via Web-graphics: nifty corners by Alessandro Fulciniti
Yahoo's site explorer "allows you to explore all the web pages indexed by Yahoo! Search"
An essential guide to understanding and using
Web Content Accessibility Guidelines 2.0
tags: accessibility search engines programming
posted on: 18 March 2006
filed under:php @ 14:20:52 comments(0)
Compiled from a variety of online sources by Web application developers in IBM's Global Production Services organization:
tags: programming
posted on: 07 March 2006
filed under:webdesign @ 19:16:44 comments(0)
On Particletree:
Very nice. I downloaded the files and I'm going to study them to see how it's done.
tags: programming
posted on: 06 March 2006
filed under:webdesign @ 13:52:38 comments(0)
tags: programming
posted on: 09 February 2006
filed under:webdesign @ 13:35:03 comments(0)
I added two tags search "forms" for del.icio.us and technorati. Since the functioning of the "forms" is based on Javascript, the "forms" are created using the DOM so that, if Javascript is not enabled, they just don't appear.
I use Firefox and I have the del.icio.us search form in the toolbar but when I'm not using my computer I have to go to the web site or type the full address for the search. Now I can do it from anywhere as long as I have access to my web site.
tags: programming
posted on: 14 January 2006
filed under:javascript @ 19:20:32 comments(0)
An interesting use of Javascript :
Lightbox
tags: programming lightbox
posted on: 13 January 2006
posted on: 11 January 2006
filed under:personal @ 13:53:45 comments(0)
This site is now powered by my own hand written code.
The features are almost the same as before, just much simpler. I used only 20% of what Wordpress made possible anyway. There are still a few things that I want to add but the core is done.
tags: programming
posted on: 04 January 2006
filed under:interesting @ 09:50:35 comments(0)
On web-graphics:
On A List Apart:
tags: websites programming layout
posted on: 07 November 2005
filed under:webdesign @ 17:42:11 comments(0)
Scripts based on the Prototype Javascript framework, visual effects and controls with AJAX:
script.aculo.us
On Evolt, some useful PHP tips: these things I know.
tags: ajax programming
posted on: 19 October 2005
filed under:webdesign @ 13:47:57 comments(0)
An interesting article on variables scope and free fonts via this mezzoblue post.
tags: programming fonts
posted on: 13 October 2005
filed under:webdesign @ 10:03:09 comments(0)
tags: programming
posted on: 12 September 2005
filed under:javascript @ 10:12:50 comments(0)
From Scott Andrew LePera cross-browser event handler has stemmed a Peter-Paul Koch article and even a coding contest.
I have been using the traditional event registration model that, as explained, has some drawbacks but since my scripts are pretty simple I find it good enough. I also make use of Simon Willison's addLoadEvent() function as of my post.
tags: programming
posted on: 23 August 2005
filed under:webdesign @ 09:56:46 comments(0)
I upgraded again.
I really hope that I will not have to do it for a while because every time is a pain. I have a dial-up connection, it takes time to download and re-publish everything. Then I must be online to make my site look the way I want and the all thing becomes an expensive process.
I'm seriously thinking of writing my own code and be done with it. I use one tenth of all the WordPress features anyway.
I set up the whole WordPress thing on my local machine so I can work on it without being online..
tags: web programming
posted on: 09 August 2005
filed under:php @ 18:06:58 comments(0)
After six months I noticed that the nav menu wasn't behaving as supposed..
The links were meant to appear as plain text and red when on their target page but an error in the code was preventing it. I have fixed the error and updated the script in the studies page.
tags: programming
posted on: 04 August 2005
filed under:webdesign @ 10:52:54 comments(0)
I just finished updating to WordPress 1.5.1.3. I got hacked in twice (through that XMLRPC file) so I had no choice. Using a modem connection it took quite a while to download the new files, delete the old files and then upload again the all thing..
Once I'm finally done I check out how my index page looks and...there is nothing, not even one single tag showing. After much looking around I found out that I had to erase
< ?php include(ABSPATH . 'wp-comments.php'); ?>
and replace it with
< ?php comments_template(); ?>
Now, so far, everything works.
tags: programming xmlrpc
posted on: 01 August 2005
filed under:javascript @ 11:47:31 comments(0)
Interesting technique:
This mouseover effect is also interesting because simple:
tags: programming
posted on: 30 May 2005
filed under:javascript @ 14:08:41 comments(0)
Found today:
“ When working with XML one regularly needs to test whether a node has a certain node type”
and this could be a convenient solution.
tags: programming xml
posted on: 17 April 2005
posted on: 03 April 2005
filed under:studies @ 12:58:02 comments(0)
I have updated the Protected copyright photo using
Simon Willison's addLoadEvent() function.
The problem for me is to be able to write a tutorial that can be understood easily by a beginner, copied and used without too much re-writing. I have a Javascript file that I import which controls the email address display and the events. To avoid conflicts, I had removed the imported file from the Protected photos page (I could have written another Javascript file with all the window.onload calls, imported it and solved all the problems, but it would have been even more difficult to explain, making the tutorial understandable only by advanced Javascript programmers). Now I wrote it back in and added some comments in the Javascript code to explain what is going on. For a beginner is confusing: how to import files, what happens, why, in which order..Simon Willison solution is pretty straightforward and should be easily understood, especially since there is a clear explanation of how it works.
tags: programming
posted on: 30 March 2005
filed under:javascript @ 10:09:10 comments(0)
The random quotes are back again.
Also, fixed a few bad links and the Javascript code for the random quotes adding a check that avoids error alerts.
This post on Simon Willison site poses an interesting problem that I have encountered already many times.
tags: website changes programming
posted on: 27 March 2005
filed under:studies @ 17:46:30 comments(0)
I have published the PHP code of my menu. The idea behind it was to have a menu that can be updated from a single file otherwise every change would mean re-pulish the whole site. The file can be used only on PHP pages, I still have some static XHTML ones and those I have to manually update and re-publish but it's a small percentage. The code could be streamlined since I repeat the same process four times but that's due to the fact that I want the menu to look the way it does and I don't know another way to float the links like that except coding each category in its own unordered list.
I also published a page that enables a user to paste a piece of code and get all the “<” and “>” symbols replaced by entities (< and >) so that it then becomes readable and can be published since the browser does not try to interpret it as active code. I find it useful and it definitely saves a lot of time.
tags: programming tools
posted on: 22 March 2005
filed under:javascript @ 14:36:13 comments(0)
As I said, I'm back online (even if with a few glitches..) and I have published the pop-up menu on the studies page.
It is very simple, the mark-up is valid XHTML and the CSS that I use for the layout can be changed to anything else. The menu works with Javascript-disabled/CSS-enabled, Javascript-enabled/CSS-disabled, Javascript and CSS disabled.
tags: programming