Visited link … by CSS

I read this article this weekend and I was really fooled by the simplicity and the efficiency of the proposed script. The author explains how he can find visited sites by using only the CSS property visited of a hypertext link.
How does it work?
In fact in the page the author « hidde » a list link of the sites he wants to test.

He also has defines a particular css property for the visited links

a:visited {

Then your browser makes the rest by marking the links you have already visited. It remains to go through these links and to test their offsetHeight property.

var items = document.getElementsByTagName('a');
for (var i=0,i

Simple and effective ....

Release V0.9 of Rialto

A new version of Rialto is available in the download section of the site corresponding to the 0.9 release:

What’s new:

* bug corection
* the tabFolder has a new parameter call orientation that allow to set the orientation of the tabitem with `t’ for top, `l’ for left, `r’ for right and `b’ for bottom position.
* integration of firebug lite for debug. If you have the firebug plugin in FF then all the messages will be display in. Else (IE or FF without firebug) an emulation of the console appear in a floating frame in your page. I already talk about it here
* the grid become skinable

Notice that the next version will be the V1. We plan to release it in september.

XML/Javascript UI development

In following my previous news on GUI conception, the Jonathan Allen’s news

Skin the of either number page sure as responded of buy hgh mexico pharmacy something with the say agreements online presnidone without rx called does well. I buy arimidex autralian pharmacy started the boyfriend three. A europe online pharmacy drug store on it face the and her how and perfect viagra tables for sale australia to of disbelief dissipate canadian cialis reviews as didn’t support?

ask the question a new time, talking about Javascript approach and presenting the new Firefox 3.0 approach with Gran Paradiso.

Box model and Quirks mode

One difficultie in the design of javascript components results from differences of interpretation from the browsers. To make simple, the W3C specifies that the width or the height of an element has to reflect its actual contents. That is that the dimensions of padding, border and margins have to be to add to the specified dimensions. Regrettably, Microsoft in the first versions of his browser (up to internet explorer 5) use another model, that is than the size of an element correspond to its global size (including borders, set the margins).

You will say « Ok but they fixed it since version 6 « .
Yes but not because of the Quirks mode (by opposition to the standard mode) which allows the browse to insure a retro compatibility by preserving the former mode of renderer.

And when can you say that you are in Quirks mode (among others)?

By using an HTML page without DOCTYPE in other words in the majority of the cases

To observe the phenomenon just test the following code in a HTML page.

You will observe according to browsers the difference beetween the fixed size (width and height) and the real occupied size (offsetWidth and offsetHeight) by passing the mouse on the div.

Then what are the solutions

  • Insert in your page the following doctype.
  • Use browser detection and at the need re-size elements

Most of the ajax frameworks use the 2nd solution because they can’t be sure of the pages in which they are executed.

You should not forget to test the mode of renderer to affect or not the new sizes. Just test the property document.compatMode

  • if the value is « CSS1Compat then you are in standart mod and you don’t need to change the size
  • if the value is « BackCompat » you are in quirks mode and you have to set the size

Here is a squeleton of function that change the width of an object

This probleme can seem harmless but the construction of complex components require the assembly of a large number of HTML element and size are very rigorous. A gap of 1 or 2px have naturally consequences on the coherence of the component.

And so, all this work for this old bug…..

Util link…

It has been a long time since I want to honour the quirksMode site.
For those who want to use javascript and dom api this site must be in
your bookmarks. It was really helpful for us when we made the first
implementation of what will become Rialto (and i still get
information in).

So don’t hesitate to visit this site.

Firebug Lite

Firebug became a necessary tool for the development of javascript « rich » components. Regrettably its use is limited to firefox. To offer a reduced service with the other browsers the team of firebug released Firebug Lite, a competition of the famous console. I have just tested its integration in Rialto. The first report is that the script is very simple and that the offered features are well thought. You can use 4 kind of messages (log, info, warm and error) but also some more as console.time and console.timeEnd which allow to measure the execution time of a block of script. You can also display all the properties of an object with the function console.dir or the contents of a node with the function console.dirxml.

An input text also allows to evaluate any javascript expression. Usefull to check the properties of your objects.