lewro’s blog - 2.1 - web designer beginner

Archive for January, 2007

Javascript the 3rd leg of my blog

January 29, 2007 [12:20 pm] No Comments

As you already know modern web design is walking on 3 legs.

  • Semantic markup for content
  • Cascading Style Sheets for display
  • Unobtrusive ECMA script (called Javascript) for behaviour

Missing leg

You could see that my blog has been missing one leg up till now. I has been using XHTML 1.1. Strict (which now validates - I had a small problem with search form), CSS 2.0 divided into 3 files - layout, colour and typography (they validates as well). I find it very useful this way. It keep the code nice and clean and finding anything is a piece of cake. The idea comes from DOM-scripting guru Jeremy Keith.

So the next on my agenda is to create some interesting javascripts(JS). I have read two books about JS and I have studied the basics of JS during my CIW course but I am still not very comfortable using it. I will have to play a lot more with the code to get the whole idea.

The first project

Here comes the first project. I am going to implement DOM-script which will be replacing font size values in my CSS to give users the possibility to increase the font size directly from the page. Users who now how to do it using browser function (usually CTRL+) can do it this way but for the rest there will be my script

The script will fire after the page is fully loaded. It will generate list of 3 items which will be used as hooks for font size switching. The list will be generated only if the browser is capable of handling the script, if not no code will be generated. This solution will prevent having useless elements on the page when scripting is not supported by end-device such as screen readers or search engine robots what would happen if I put the code directly into the html. The script will be obviously external, linked from the head of html which is (or maybe should be) standard solution these days.

More more more

Other scripts will follow. At the moment I use 2 forms on my blog. One came with wordpress and another is plug-in. Both of them are absolutely fine but I do not like the way the form checks are done so I have decided to create some scripts for them as well.

In the future when my knowledge of JS will be better I would like to change the appearance of the script which will change the font size the way scrolling bars work or implement some drug and drop solutions. But I ma not there yet so stay tuned.

Update - 29th January 2007 - 17:30

As you can see I have successfully implemented the font resize javascript. It is still not perfect but it works. There is a place for improvement specially in code. The function creates cookie which stores the information about the users font-size selection. Somehow the cookie does not work correctly in IE 6.0. It works in latest Firefox, Netscape, Opera, IE 7.0 and IE 5.5 as well. I have not found out yet where is the problem. If you guys have an idea please let me know.

Archive for January, 2007

Life period of Lewro’s blog

January 16, 2007 [2:04 pm] No Comments

Lewro’s blog was born on 3rd of November 2006 which means it is only 2 months old. As you all know plastic surgeries are very popular these days even my blog went true the face lift procedure. Yeah, you are right it is not that old. The reason why it happened is that I am still studying and learning new things and this is the place where I practice and try to apply new knowledge.

What happened in the last 2 months?

I wrote 7 article which have earned 3 comments. My blog welcomed 1600 people till 7th of January 2007 from different places around the world until something happened.

Something happened

My site was presented on the web gallery CSS Mania and the traffic to my blog jumped that day to 711. Unbelievable. What could I wish more. I am really happy that people liked the site preview on that site and were interested enough to visit my blog personally. The blog was presented on these galleries in the next days:

You can image that brought a lot of people to my blog. You are probably one of them. See the graph bellow from google analytics.

Google analytics

But what more, people did not just check the first page and left but they explored the site as well and for that I am extremely happy.

See the statistics from Crazy Egg where people were clicking.

Google analytics

Huge thank you!

Thank you guys for visiting my blog and thank you web galleries for presenting me. It means a lot to beginner like me who sow the html year ago for the first time.

Help!

Today I went to Apple store because I wanted to see how my blog looks on the MACs. I was disappointed from what I saw. The page does not render correctly on Safari web browser. The whole menu is gone. Does anybody know what can be the reason?

The page renders correctly in latest Firefox, Opera, Netscape, IE 6 and I hope IE 7 as well. Thought there will be no problem with Safari but as you can see there is one.

Thanks in advance