xhtml section added

January 31st, 2007

I’ve added an xhtml playground, and to view the site you need a proper browser. (Safari, Firefox, Opera, or Konqueror) Ie6-7 cannot interpret the xhtml mime type and you get a download prompt. So get a real browser and lets try to finally move to xhtml. Even though we’re about 5 years behind schedule on that one, with about another 5 years to go!

The section is currently fairly lame as I’ve just been busy trying to get it to work (damn remote hosting) and have just a test document up at the moment. Later I intended to play around fully with SVG. Although I am upset with my current tests however, as the SVG support in Firefox seems rather limited. Either way, keep on the lookout for that.

I also modified a page for a co-worker, as she was redesigning her portfolio and was trying to use tables for layout, so I made this CSS2 layout for her. If you have time stop by and check out some of her work, it’s pretty good (maybe that’s because some if it’s my work too? ;P)

New tutorials + php

January 30th, 2007

Two new articles up in the tutorials section, both aimed at beginners; “How to write HTML like XHTML” and “How to decide on XHTML or HTML”. For the latter article I tried to take an impartial side to the debate, but that’s only so possible as XHTML has some major flaws that have to be addressed.

In other news I took out the ajax (was keeping adsense from display ads relevent to the content, plus I had no meaningful meta content for each page) So now I’m using php to generate a header and footer, and slap the content in the middle. Next I’ll be writing a function that can be called from the content page to pass meta values to the header page. In addition I think I’m going to write a “contact” page so I can get my email off the page header. I would prefer not to be gettin junk mail at my main email.

Last up for current articles will be a learn html article, as it’s hard to find any reliable articles out there that stress form.

AJAX source

January 29th, 2007

I’ve decided that with my new interest in this site and web standards I’d write an article based on web standards for the beginner. A simplified version of the xhtml vs. html argument , doc types, and writing valid code. Which should become available in the coming weeks.

The topic has required a lot of reasearch on the subject, which was necessary based on all the unfounded arguments floating around ont he web. Not to mention just a general misunderstanding of xhtml and html. It seems as if neither side really understands the other (akin to a generational gap between a grandparent and their grandchild) to the point where they will make wild assumptions about the other markup langauge.

I have reduced some of the functionality of the ajax script before I end up removing it all together. I’ll paste it here so that you can see it in it’s entirety if I do completely remove it. The httprequest object creation is based off the script I found at w3schools.

function createAjax() {
  var xmlHttp;
  if (window.XMLHttpRequest) {
    xmlHttp=new XMLHttpRequest();
  }
  else if(window.ActiveXObject) {
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      try {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch (e) {
        alert("Your browser does not support AJAX!");
        return false;
      }
    }
  }
  return xmlHttp;
}

function getType(name) {
  xmlHttp=createAjax();
  xmlHttp.onreadystatechange=function() {
    if(xmlHttp.readyState==4) {
      document.getElementById("content").innerHTML=xmlHttp.responseText;
    }
  }
  xmlHttp.open("GET",name + ".html",true);
  xmlHttp.send(null);
}

Quite simply I call getType() with an onClick() event on one of my links, passing it the content type I want. I.E. if I want about.html, I just call getType(’about’). Then an HttpRequest is created, and the responses is placed inside my content div tag.

I eventually plan on removing this completely, but will instead start using it for comment areas on my articles (or whatever else I feel needs it). This initial implementation was simply a demonstration for myself and my friends. I was also interested in how standards compliant it was. That’s about all for now, so until later.

AJAX because I Can!

January 26th, 2007

I’m at a record pace this week, with two whole posts. The reason of this post is I added some superflous technology to the site and wanted to share with you. I’ve been reading up on AJAX lately and implemented it in my site. If you don’t know what AJAX is, you will notice when you click on any of the links to the left that lead you to a page that looks like this one, the whole page doesn’t refresh, only the content area does. AJAX allows you to make http requests without reloading the page (which is pretty handy.) One good example of this is the events calender webiste onCurrent. Their nav and content are seperated so you only have to reload the important part of the page.

Now my site is entirely too small for bandwith to really be a concern and I don’t have any dynamic content, so it’s really not nessecary. However, I still wanted to implement it in site, and it does allow me to seperate the rest of my page from all it’s content. I.e. I can update the header or the navBar in one page and it’ll show up on every page thereafter, as opposed to having to make the change on every single page.

This method does have it’s drawbacks though. If a user has javascript disabled they cannot veiw my site. I will have to find a way to send users with javascript turned off to a page where it’s not used. Again that may not be necessary as I’m fairly certain my user-base will all have javascript enabled. But as a saftey measure I think I’ll add a warning.

It’s a fairly simple bit of code if you get it from my scripts directory you can see. I guess the next improvement is to be some dynamic pages, I’m assuming a comments page. So I can at least get some use out of this technology. That’s all for now.

New Website Design

January 24th, 2007

New design now, standards compliant, much smaller in filesize, and looks better in my opinion. It’s based completely on css2 for layout, which is good because table layout is hideous. In this post I’ve included a step by step walkthrough of the process I used to create santashotline.com’s page layout. It was the second design version and really benefitted from an attempt at understanding the customer’s needs/wants and evoking those through art and text.

Here are the steps I took to design santashotline.com