Notes on a web journey

posted on: 27 September 2010

Ubuntu and HTML5 (unrelated)

filed under: @ 10:47:52

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:

posted on: 17 September 2009

Dive Into HTML5

filed under: @ 10:37:04

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:

posted on: 20 July 2009

Resource Description Framework

filed under: @ 10:27:44

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:

posted on: 03 July 2009

PHP quick profiler

filed under: @ 09:54:03

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:

posted on: 07 February 2009

Javascript debugging

filed under: @ 10:38:22

On A List Apart :

Advanced Debugging with JavaScript

tags:

posted on: 02 February 2009

HTML 5 resources

filed under: @ 19:57:07

A list of resources on HTML 5 by Cameron Moll :

12 resources for getting a jump on HTML 5

tags:

posted on: 28 November 2008

Coding nicely

filed under: @ 12:40:02

Via an article on Particle Tree:

tags:

posted on: 16 October 2008

Empty variables

filed under: @ 16:18:23

A Javascript function to check if a variable is empty:

Feelin' Empty

tags:

posted on: 22 September 2008

Buttons, PHP and characters

filed under: @ 19:14:03

A few links :

tags:

posted on: 06 September 2008

Debugging HTTP

filed under: @ 09:42:03

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:

posted on: 07 July 2008

Javascript binding

filed under: @ 10:36:55

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:

posted on: 07 June 2008

Title Case

filed under: @ 10:36:22

Javascript code to turn text into a title capitalizing the first letter of each word:

To Title Case

tags:

posted on: 19 May 2008

Lazy loading

filed under: @ 18:10:03

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:

posted on: 20 April 2008

Flickr badge solved

filed under: @ 10:31:41

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:

posted on: 16 April 2008

Extensible CSS interface

filed under: @ 09:38:31

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:

posted on: 09 April 2008

Flickr badge five

filed under: @ 15:37:02

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:

posted on: 07 April 2008

Flickr badge four

filed under: @ 19:59:02

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:

posted on: 04 April 2008

Flickr badge continued

filed under: @ 10:35:02

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...

IE screenshot

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:

posted on: 03 April 2008

More Javascript flickr badge

filed under: @ 10:19:04

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:

posted on: 02 April 2008

Javascript flickr badge

filed under: @ 14:27:21

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:

posted on: 17 February 2008

getElementById in Internet Explorer

filed under: @ 10:57:04

On 456 Berea St. :

Beware of id and name attribute mixups when using getElementById in Internet Explorer

tags:

posted on: 22 October 2007

Cross-browser XMLHttpRequest

filed under: @ 19:24:32

A post about XMLHttpRequest via Stringify :

Re-inventing XMLHttpRequest

Stringify has a new look, very nice.

tags:

posted on: 16 October 2007

Forms in php

filed under: @ 19:02:31

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:

posted on: 10 May 2007

Dynamic data

filed under: @ 09:01:22

On Vitamin :

The Standards Way to Do Dynamic Data

tags:

posted on: 02 May 2007

JavaScript calendar

filed under: @ 09:08:05

On The Strange Zen of Javascript :

How to build a simple calendar with JavaScript

tags:

posted on: 30 April 2007

Php array_diff_assoc

filed under: @ 19:21:02

On Content with Style :

array_diff_assoc and the order of parameters

tags:

posted on: 30 April 2007

InsertBefore

filed under: @ 19:05:32

On Content with Style :

Swapping nodes in a DOM tree

tags:

posted on: 28 April 2007

JavaScript techniques

filed under: @ 09:24:08

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:

posted on: 24 April 2007

Software security

filed under: @ 19:04:26

..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:

posted on: 14 April 2007

Web technologies

filed under: @ 19:16:21

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:

posted on: 05 April 2007

XMLHttpRequest with importNode

filed under: @ 19:20:08

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:

posted on: 21 March 2007

Primary keys: ID vs GUID

filed under: @ 19:18:37

On Coding Horror :

Primary Keys: IDs versus GUIDs

The GUID stays unique globally while the ID is unique only within a single table.

tags:

posted on: 15 March 2007

MySQL insert and update

filed under: @ 09:16:41

On Array Studio Workshop:

MySQL insert a new row or update old one

tags:

posted on: 10 March 2007

Regex

filed under: @ 20:00:21

On Sitepoint:

The Joy of Regular Expressions [4]

links to part [3], part [2] and part [1]

tags:

posted on: 01 February 2007

Sound on web browsers

filed under: @ 19:33:08

Sound with Javascript:

sound in web browsers without Flash

tags:

posted on: 31 January 2007

Htaccess tricks

filed under: @ 09:50:22

On perishablepress:

htaccess tricks

tags:

posted on: 28 January 2007

IP address image

filed under: @ 19:08:41

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:

posted on: 24 September 2006

Object oriented Javascript

filed under: @ 09:47:01

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:

posted on: 23 September 2006

Understanding HTML, XML and XHTML

filed under: @ 18:35:02

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:

posted on: 02 September 2006

HTTP authentication

filed under: @ 10:38:03

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:

posted on: 28 July 2006

JavaScript closures

filed under: @ 20:58:09

This article explains closures so that a programmer can understand them - using working JavaScript code.

Closures Are Not Magic

tags:

posted on: 25 July 2006

Object Oriented Javascript

filed under: @ 19:01:42

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:

posted on: 22 July 2006

Javascript includes and link thumbnail

filed under: @ 19:07:55

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:

posted on: 12 July 2006

Building Accessible Widgets for the Web

filed under: @ 18:48:09

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:

posted on: 12 July 2006

Automatic magazine layout

filed under: @ 18:42:03

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:

posted on: 28 June 2006

Debugging stylesheets

filed under: @ 18:54:21

On Airbag: a ruler to debug stylesheets.

tags:

posted on: 26 June 2006

Navigational metaphor and tooltips

filed under: @ 11:16:08

On Interconnected: making senses

On Clagnut: line breaks in tooltips

tags:

posted on: 21 June 2006

URLs structure changed

filed under: @ 14:19:08

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:

posted on: 20 June 2006

URL structure

filed under: @ 18:47:29

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:

posted on: 20 June 2006

Behavioral Separation

filed under: @ 16:03:45

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:

posted on: 18 June 2006

Four tier web development

filed under: @ 13:08:58

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:

posted on: 12 June 2006

Javascript teleprompter

filed under: @ 10:22:18

On DOMScripting: Javascript teleprompter

tags:

posted on: 16 May 2006

Javascript and Selectors

filed under: @ 11:38:21

On Web-Graphics: Javascript and Selectors

tags:

posted on: 06 May 2006

PHP and DHTML

filed under: @ 10:55:29

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:

posted on: 27 April 2006

Future web and language tags

filed under: @ 09:37:28

On Digital Web Magazine: Build for the Future

On 456 Berea St:

tags:

posted on: 21 April 2006

Secure and awkward Javascript

filed under: @ 13:53:50

On A List Apart: secure your code

On Dustin Diaz' site: awkward looking javascript

tags:

posted on: 18 April 2006

Class attributes and Javascript

filed under: @ 19:03:45

On Stringify: Class attributes and Javascript

tags:

posted on: 27 March 2006

Bookmarklet

filed under: @ 14:03:48

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:

posted on: 23 March 2006

Nifty Corners,Yahoo site explorer and WCAG 2.0

filed under: @ 13:50:18

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:

posted on: 18 March 2006

PHP reading list

filed under: @ 14:20:52

Compiled from a variety of online sources by Web application developers in IBM's Global Production Services organization:

tags:

posted on: 07 March 2006

Replacing trackback and Lightbox gone wild

filed under: @ 19:16:44

On Particletree:

Very nice. I downloaded the files and I'm going to study them to see how it's done.

tags:

posted on: 06 March 2006

CSS photo gallery and removing dotted links

filed under: @ 13:52:38

On Sonspring:

tags:

posted on: 09 February 2006

Del.icio.us and Technorati search forms

filed under: @ 13:35:03

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:

posted on: 14 January 2006

Javascript Lightbox

filed under: @ 19:20:32

An interesting use of Javascript :

Lightbox

tags:

posted on: 13 January 2006

Javascript defaults

filed under: @ 13:06:23

From Web-graphics:

tags:

posted on: 11 January 2006

My own code

filed under: @ 13:53:45

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:

posted on: 04 January 2006

Best 20 of 2005, query and grids

filed under: @ 09:50:35

On web-graphics:

On A List Apart:

tags:

posted on: 07 November 2005

Scripts and tips

filed under: @ 17:42:11

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:

posted on: 19 October 2005

Variables scope and free fonts

filed under: @ 13:47:57

An interesting article on variables scope and free fonts via this mezzoblue post.

tags:

posted on: 13 October 2005

Userscripts, window.onload and mod_rewrite

filed under: @ 10:03:09

Through Simon Willison's weblog:

userscripts.org

Then:

tags:

posted on: 12 September 2005

Javascript event handler - addEvent()

filed under: @ 10:12:50

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:

posted on: 23 August 2005

Upgraded again (WordPress 1.5.2)

filed under: @ 09:56:46

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:

posted on: 09 August 2005

Site navigation menu

filed under: @ 18:06:58

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:

posted on: 04 August 2005

Updated to WordPress 1.5.1.3

filed under: @ 10:52:54

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:

posted on: 01 August 2005

Footnotes and mouse over

filed under: @ 11:47:31

Interesting technique:

This mouseover effect is also interesting because simple:

tags:

posted on: 30 May 2005

Javascript and nodeType(s)

filed under: @ 14:08:41

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:

posted on: 17 April 2005

Javascript shell

filed under: @ 15:55:00

Javascript shell:

tags:

posted on: 03 April 2005

Javascript window.onload

filed under: @ 12:58:02

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:

posted on: 30 March 2005

Small adjustements

filed under: @ 10:09:10

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:

posted on: 27 March 2005

PHP menu and tags replacer

filed under: @ 17:46:30

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 (&lt; and &gt;) 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:

posted on: 22 March 2005

Pop up menu

filed under: @ 14:36:13

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:

CSS,Javascript and Php studies

Anti spam email
A solution to writing an anti spam email contact link
filed under: Javascript
Background image
A background image randomizer that I used in the second version of this site.
filed under: Javascript/CSS
Javascript menu
A menu that uses Javascript and session cookies.
filed under: Javascript/CSS
MiniSite
Experimenting with CSS and Javascript.A simple but, in my opinion, nice navigation “system”. The MiniSite is a one page site.
filed under: Javascript/CSS
Photo display
Protect copyrighted photos: a simple but effective solution.
filed under: Javascript/CSS
Photo gallery
A photo gallery made for a friend
filed under: Javascript
PHP menu
A PHP menu that can be updated without having to re-publish all the pages is on.
filed under: PHP
Pop-up menu
A very simple pop up menu powered by Javascript. It works also if Javascript is disabled.
filed under: Javascript/CSS
RSS feed
How to write and use an RSS feed
filed under: rss-xml
Tag replacer
The Tag replacer explained and a link to it.
filed under: PHP
Tags search
A search form build and powered using Javascript and the DOM
filed under: Javascript