IE7 and form submitting

Often, IE7 is regarded less standards compliant than its open source alternatives. Accidentally I ran into a – at least for me – unknown feature in IE7 which proves that in some cases IE7 can be rather strict. Take this, a FORM without a submit-button, but with a BUTTON-button:

<form>
  <!-- a lot of code -->
  <button>fire!</button>
</form>

Firefox just submits the form when you click the button. IE7 however does nothing! It appeared that IE7 only submits the form when the attribute type is specified as type=”submit”.

  <button type="submit">fire!</button>

Cool! Seems logically in the end. Where are the times that Microsoft interpreted all your sloppy code?

Tested with a XHTML 1.0 Strict page with a FORM-element which included three BUTTON-buttons. I encountered no form submitting problems without the type attribute specified  in FF 2.0.0.1 or in Opera 8.54 on Windows XP SP2. I didn’t test in IE6 or other exotic browsers. Continue reading

Jaiku

Loop je voortdurend rond met gedachten hoe je internetmiljonair kunt worden door mee te liften op de web2.0-hype? Probeer dan niet te focussen op slimme of handige apps waar men iets aan heeft. Mijn favoriete verpozingswebsite van de laatste tijd is Jaiku, een volstrekt nutteloos (Fins) initiatief dat jouw diverse feeds en die van je vrienden aan elkaar knoopt. Wel even om het uur je ‘presence‘ aanpassen!

Tags: , , , , ,

Play around with Microsoft Gadgets

Yahoo! came with Widgets, so now it’s Microsoft’s turn to introduce Gadgets. It’s the same idea: little, useless programs you install on your desktop and that eat up your resources. Interesting point: Microsoft Gadgets only run on Windows Vista!

However, Microsoft also has a web alternative: live gadgets. These gadgets are installed and run on your personal start page (as Microsoft sees it) live.com. Today I had to do a bit of a research on gadgets and walked through the Windows Live Gadget Developer’s Guide. In the guide I discovered two little errors, so if you want to play around with gadgets be aware:

  1. In section “Setting Up Your Environment” is stated: “In order to develop locally hosted Gadgets within IE, ensure that you have set the ‘Access data sources across domains’ setting to ‘prompt’. Inside IE, you can check this through Tools -> Internet Options… Click on the Security tab, select internet zone and click on ‘Custom Level’. Under ‘Miscellaneous’ select ‘prompt’ for ‘Access data sources across domains’.” Be sure that this accounts for the internet zone as well as for the trusted zone!
  2. In section “Defining Content” a code example is provided with the following line “Gadgets/htmlinliner/htmlcontent.xml”. On my station this only worked with a full address: “http://localhost/Gadgets/htmlinliner/htmlcontent.xml”.

Check my delicious-links on Microsoft Gadgets. Happy gadgetting!

Tags: , , , , ,

Betere HTML in 37 stappen

Een paar weken geleden publiceerde Tommy Olsson zijn artikel “Bulletproof HTML: 37 Steps to Perfect Markup“. Het is een leerzaam verhaal dat soms een belerend toontje heeft, maar desalniettemin voor velen de basiskennis van HTML kan vergroten. Een aantal dingen viel mij op.

Onder standardista’s is het nogal cool om geen XHTML, maar HTML te schrijven. Belangrijkste argument is doorgaans dat je XHTML als “text/html” en niet als XML mag serveren (omdat Internet Explorer daar geen raad mee weet). So what? zou je zeggen. Tommy Olsson: “We cannot use any of the features of XHTML when serving it this way, because we are not really using XHTML at all — we’re only pretending to.” Dan zou ik wel graag willen weten wat die ‘features’ zijn. Missen we echt iets? En over missen gesproken: mis je iets als je XHTML gebruikt in plaats van HTML? Ik vermoed van niet.

Wat ik niet wist was de betekenis van de opbouw van de DOCTYPE-declaratie (als <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">). Wat doet de ‘EN’ daar bijvoorbeeld? “Note that it doesn’t say anything about the language of the web page itself; it is the language of the DTD that is specified here.” Het eerste deel van de identifier heet de ‘public identifier’ en het tweede deel de ‘system identifier’. “If the system identifier is missing, or if there is no DOCTYPE declaration at all, browsers assume that this is an old document and render it in ‘quirks mode’.” (Hé, zou Anne bewust ‘quirks mode’ triggeren?)

Ook over character encoding is Olsson verhelderend. Ik wist bijvoorbeeld niet dat de character set die je in je HTML-pagina opneemt (bijvoorbeeld “<meta http-equiv="Content-Type" content="text/html; charset=utf-8">“) overruled wordt door de HTTP header die je mogelijk via de server verstuurt.

Over het address-element zegt Olsson dat “A common misconception is that address is meant to be used to mark up only postal addresses, but that is not the case.” Ook telefoonnummers en andere contactinformatie kan met het address-element opgemaakt worden. Hij vergeet evenwel te vermelden dat het bij het address-element gaat om de contactinformatie die van toepassing is op de informatie die een bepaalde pagina geeft. Een adresboek bestaat dus nietuit een lange reeks address-elementen.Alleen de contactgegevens van de maker van het adresboek zou je in een address-element mogen verwachten.

Olsson licht nog een paar HTML-elementen toe die we nooit gebruiken omdat geen CMS ze ondersteunt. Maar toch is het handig om te weten dat “A certain term should only be marked up with dfn once in a document (where it is first used and explained)” en dat “A common misconception is that var should be used for marking up variables in programming code samples”.

Over het alt attribute kan nooit genoeg gezegd worden: “This text equivalent should not describe the image; it should convey the equivalent information”. Olsson geeft ook een helder voorbeeld om deze stelling toe te lichten (zie step 33).

Tot slot beweert Olsson dat de waarde van een id, name and class attribute altijd moet beginnen met een letter. Ik dacht evenwel dat het ook een underscore mocht zijn?

Een aantal van dit soort artikel tesamen zou een prachtig boek kunnen vormen over de basis en de achtergrond van HTML; verplichte kost voor iedereen die al langer dan vijf jaar met HTML zit te knoeien.

Tags: , ,

IE7 – daar komt ie eindelijk!

The final release of IE7 is fast approaching … and I mean really fast … and will be delivered to customers via Automatic Updates a few weeks after it’s available for download.

Her en der op het net blijven mensen mopperen dat IE7 niet perfect is etc. etc. etc. Wat mij betreft heeft het IE-team gelijk en moet dit ding eindelijk een keer gereleased worden. En de mooie opdracht voor IE8 is beter te worden dan IE7!

IE7 Is Coming This Month…Are you Ready? (IE-blog)

Tags:

RSS date formatting with MSXML4

Damn, I’ve been looking for this for a long time, but I couldn’t find a proper solution. So, what was the problem? Well, I wanted to create a page that gives an overview of several RSS-feeds I follow. The page should replicate some information of these feeds: just the title and the date of the last 5 posts. I wanted to give the date in the feed (i.e. ‘pubDate’) a nice Dutch look and feel, so the rather unreadable “Fri, 15 Sep 2006 13:57:48 +0000″ would become “15 september 2006″. These RSS-feeds I parse with an XSLT-stylesheet using (Classic) ASP.

A date in a RSS-feed must be defined as RFC-822. However, I could not use the handy date-time functions for XSLT 2.0 to format this date, because these are not supported by MSXML4, the XML-parser my provider supplies. MSXML supports the ms:format-date function, but this function can handle only standard XSD date formats, which RFC-822 is not. (Bloody hell, I wanted to get back to client-side coding!)

The solution I took is the following: using VBScript in my stylesheet I parse the RFC-822 date as a string and build my Dutch date format with my own hands:


<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:vbs="urn:schemas-sqlxml-org:vbs">

<msxsl:script language="VBScript" implements-prefix="vbs">
  <![CDATA[

   function formateDate(datum)
     dim arr, mnd, x, y, dag, jaar
     arr = Split("Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", ",")
     mnd = Split("januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december", ",")
     For x = 0 To UBound(arr)
       If InStr(datum, arr(x)) Then
         y = InStr(datum, arr(x))
         dag = Left(datum, y)
         jaar = Mid(datum, y, 8)
         formateDate = stripNr(dag) & " " & mnd(x) & " " & stripNr(jaar)
         exit function
       End If
    Next
    formateDate = ""
   end function

   function stripNr(nr)
     dim arr, str, x
     arr = Split(nr)
     for x = 0 to UBound(arr)
       if isNumeric(arr(x)) then str = str & arr(x)
     next
     stripNr = str
   end function

  ]]>
</msxsl:script>

[... some more code ...]

I’m not sure if this is a good approach, but luckily it works, and it’s good enough for me, because the page I wanted to create is just a start page for my mother with references to several baby blogs: greut.nl/startpagina.

Nonetheless I’m very pleased to get feedback on the code, if you have a better solution, please share it with me!

Tags: , , , , ,

d.Construct 2006: a second feedback

The programme at d.Construct left hardly any spare time, so filling in a feedback form far before the end of the conference did not make much sense. But we had to, otherwise we didn’t take part in the contest. So here’s a quick wrap-up, which can be considered to be my final feedback for d.Construct. Let’s start with the top issues and end with the horrors:

++

  • Jeffrey Veen’s talk on Designing the complete user experience was again a splendid performance. He alone was worth the entry fee for this conference.
  • Derek Featherstone’s examples of real life accessiblity problems with simple user interfaces compensated a lot the interesting (but accessibility neglecting) speeches on AJAX and Flash.
  • Yahoo! idea of ‘hack day’ (presented by Simon Willison and Paul Hammond) is an absolutely interesting concept for other internet companies too.
  • The backnetwork (only accessible by attendees) was excellent. Well done!
  • Brighton is a perfect location for web conferences. Not that far from airports and meanwhile sunny, beachy, interesting and alternative.
  • Serving tea with milk! This is one of the greatest shortcomings of the Netherlands.

+

  • The talks on AJAX and mash-ups definitely triggered me. Being an accessibility advocate myself, I’m normally not that interested in trendy technics that break the usebility or accessibility experience. Now, I’m sure to try out some things. As Jeremy stated “just because the joy of it”.
  • Meeting other attendees is always interesting. I talked to PPK on his new book and we came to the idea that in the Netherlands we are in need of a mash-up that compares book prices of different Amazon shops (USA, UK, Germany), including their shipping fee.

-

  • Jeff Barr’s talk on Amazon’s web services was totally useless, being nothing more than an ordinary sales talk on Amazon’s activities. Clear:left apparently needed the money?
  • It would have been very convenient if the organisation had handed out some paper to make notes on. As blogging was nearly impossible, ordinary hand written notes came to the rescue.

- -

  • The conference centre Brighton Corn Exchange, ouch, is not a conference centre! There was so little space between the chairs that my legs still hurt and I didn’t know where to put my arms. Working on a laptop of course was impossible, even if there had been more light. I suppose there hasn’t been a lot of blogging during the day. Tip: choose something like a university auditorium for the conference?
  • There were no power supplies available in the conference room, so unless you brought in three spare batteries, your laptop would have run out of service during the first or second session. As mentioned above, blogging was hardly possible, so this is just a tip for next year. I definitely will not come back next year if these last two points won’t be solved properly.

Tags: ,

Het W3C is geen godheid

Er is de laatste tijd een hoop heibel binnen en rondom het W3C. Gaat het niet om accessibility (WCAG 2 – bevrijding uit een keurslijf?) dan wel om een SVG specificatie. Bekende namen verlaten het W3C en gerenommeerde bloggers nemen de ‘opstellers van onze standaarden’ ongenadig onder vuur.

David Baron, een Mozilla developer die ook in de W3C’s CSS working group zit, licht in zijn artikel More W3C Controversy toe hoe besluitvorming binnen het W3C werkt. Zijn uitvoerige verhaal komt in feite neer op de wens van het W3C om het web voor de pc en het mobiele web aan één standaard te laten voldoen en de weigering van vooral de vertegenwoordigers van het mobiele spectrum hier aan te voldoen:

The problem is that they don’t have much incentive to choose behavior that’s compatible with the content on the Web.

Het vastleggen van standaarden lijkt vervolgens neer te komen op een wedloop wie het eerst zijn regels op papier heeft neergekalkt om op die manier de tegenpartij voor het blok te zetten.

Baron komt ook met een oplossing. Misschien moeten we de W3C-soep niet zo heet eten als ze wordt opgediend:

No members of the W3C should be obliged to implement any specifications, or criticized for failing to do so simply because the specification they do not implement is a W3C Recommendation. Instead, specifications should compete on their own merits among implementors, authors, and users.

Baron is van mening dat bijvoorbeeld Microsoft de CSS2-standaarden in IE7 niet heeft geimplementeerd omdat het W3C-standaarden zijn, maar omdat Microsoft dacht dat dat voor hun product de beste keuze was.

Dat hoeft helemaal geen probleem te zijn, vindt Baron, zeker niet als de interne strijd binnen het W3C de developer of de gebruiker met onmogelijke of onbelangrijke regels opzadelt:

We should work on, and implement, the standards that we think are appropriate for Web browsers, and ignore the rest.

Het gevaar van deze benadering is natuurlijk dat iedereen op eigen houtje een standaard kan gaan implementeren en dat we terugvallen naar de reuzeverschillen tussen IE4 en NN4. Hopelijk is de webcommunity sterk en eensgezind genoeg om in elk geval over de belangrijke regels overeenstemming af te dwingen.

Tags: , , , , ,

Happy clog

Happy Clog laat weer van zich horen. Martin Reurings heeft een steen in de stille vijver gegooid om te achterhalen of er nog leven in de klomp zit: hij is de Google Group Happy Clog gestart.

Achter Happy Clog zit een aantal jonge (en een enkele iets minder jonge), ervaren en enthousiaste webontwikkelaars. Hun idee was het promoten van webstandaarden in Nederland, maar hun eerste acties leken voor de buitenstaander vooral neer te komen op het drinken van bier en het opscheppen daarover tegen hun Engelse brothers in crime.

Het meest vruchtbare idee kwam van Faruk, die – analoog aan @media – een Nederlandse front-end webconferentie wilde organiseren. Helaas is het daar nog niet van gekomen.

Een paar tips daarom voor een succesvolle Happy Clog:

  • Bijt je niet vast in procedures. Wat maakt het uit of happyclog.nl een wiki is? Is het per se nodig om van tevoren af te spreken om eens in de zoveel maanden bij elkaar te komen?
  • Probeer de groep open te houden voor buitenstaanders. Een ouwejongen-krentebroodsfeer kan potentieel geinteresseerden buiten de deur houden. En daar kunnen juist de mensen tussen zitten die je wilt overtuigen.
  • Wees niet bang de dialoog aan te gaan met de grote internetbureaus in Nederland. Daar zitten immers de jongens (en meisjes) die de meeste Nederlandse sites bouwen, met niet altijd even bewonderenswaardige uitgangspunten als het om client-side code gaat.
  • Het idee van een conferentie blijft aantrekkelijk. Ik zou echter niet puur op eigen houtje opereren. Kennis van webstandaarden is één, maar voor het organiseren van een conferentie moet je ook uit een ander vaatje kunnen tappen. Jullie zijn niet de enigen in Nederland die het belang van webstandaarden onderkennen. Is het mogelijk om hulp te verkrijgen van bijvoorbeeld Accessibility of een ministerie? Ook zou ik me voor kunnen stellen dat een groot internetbedrijf graag zijn naam verbindt aan een dergelijk initiatief. En wellicht is het mogelijk om als subonderdeel onder een bestaande conferentie te opereren?

Tags: ,