Wednesday, 19 December 2012

MCSD - 70-480 Exam Prep - HTML5

I have been reading HTML5 and CSS3: Develop with Tomorrow's Standards Today. Those are some notes I have prepared later on for some quick revision. Someone might find it quite useful.

Note: This is work in progress and by no means finished!

New Syntax

No more special doctypes only one!

<!DOCTYPE html>

New Tags

  • <header>
  • <footer>
  • <nav> 
    • Some sort of navigation
  • <section>
    • Section defines a large portion of the document. Article is a smaller (could be many of them together) normally within a section.
  • <article>
  • <aside>
    • Something extra to the content (quotes, diagrams etc)
    • NOT SIDE MENUS etc.
  • <progress>
    • Not implemented yet in any browsers
  • <meter>
    • Not implemented yet in any browsers

Falling back

  •      To simply add those tags to browsers that might not support do...
    • document.createElement("nav");

New input types

  • range
    • min/max
  • number (spin box)
    • min/max/step
  • date
  • email
  • url
  • color
Test to see if they are working by simply creating element 
var input = document.createElement("input")
input.setAttribute("type", "color")
To test if it supports it if(input.type !== "text") 

Modernizr is also good plugin to help with a headache. 

New attributes

  • Attributes starting with data-* will be ignored and are used by JS to keep data rather than injecting it into classes etc.
  • autofocus
  • placeholder
  • autocomplete=[on/off] ?? shouldn't it be [true/false]
  • contenteditable[true/false] - need to handle post backs manually

Monday, 3 December 2012

MCSD - Exam 70-480 Preparation

I'm in a process of preparing for an exam (480) which is
- 480: Programming in HTML5 with JavaScript and CSS3

It is a part of MCSD certification from Microsoft.

I'm not going to be using Microsoft training so I have to research a bit and find materials I need to master those topics. In here I'll add few resources that I'm going to be using to prepare. It is very much fluid list.

  1. Blogged By Chris - Blog - Very usefull

  1. HTML5 & CSS3 For The Real World - $3.99 (on 2012/12/04)
  2. HTML5 and CSS3: Develop with Tomorrow's Standards Today (Pragmatic Programmers) - $15.40 (on 2012/12/04)

Also what I have found is that first exam is free. See here

Thursday, 29 November 2012

Manual removal of domain in Plesk 9.X

I have had issues today removing a domain from Plesk 9. Web administration panel kept on coming back with "Delete successful" however the domain was still there. It seems that someone has removed files and IIS records without actually removing anything from Plesk records. This caused some dirty records and issues that web front wasn't showing.

After some research I managed to find some good old command prompt tools inside
%plesk dir%\bin
%plesk dir%\admin\bin

1. Command line returned following error. (At least it returned some error rather than just saying it was successful).
An error occured during domain removal: Unable to remove domains: Unable to remove hosting: Unable to delete logrotate config: logrot_mng failed: Execute websrvmng --update-log-rotation "--vhost-name=[name_of_domain]" failed: Site [name_of_domain] doesn't exist.

2. I have then changed directory to admin/bin and ran following command
websrvmng.exe --reconfigure-vhost --vhost-name=[name_of_domain]

3. Remove domain.
domain.exe -r [name_of_domain]

This fixed my problem and left our Plesk server nice and clean.

Thursday, 22 November 2012

IE (Internet Explorer) 9 Crashing when loading a page


I have been assigned a critical issue one of our customers had with their site. Every time they loaded certain page IE9 would crash without giving any reason as to why. (Used Windows 7 in all cases)
Faulting application name: iexplore.exe, version: 9.0.8112.16455, time stamp: 0x507284ba
Faulting module name: MSHTML.dll, version: 9.0.8112.16455, time stamp: 0x50728e5d
Exception code: 0xc0000005
Fault offset: 0x003a2478
Faulting process id: 0x518
Faulting application start time: 0x01cdc928fdf2a877
Faulting application path: C:\Program Files (x86)\Internet Explorer\iexplore.exe
Faulting module path: C:\Windows\system32\MSHTML.dll
Report Id: 455b7416-351c-11e2-828f-000c29ad02c9
I have used Google Problem resolving technique however I was not able to find any info as to why IE9 would just crash. I couldn't replicate the issue on my machine, yet my project manager's machine crashed every time.
It turned out that it only happens on version of IE 9 (9.0.8112.16455) which as of 2012-11-23 seems to be the latest. Previous version (which I ran on my local weren't affected by this problem.


IE would just crash with no apparent reason (one of those "Internet Explorer needs to be closed"). Event Viewer showed me error showed above.

Next step was to get "Fiddler" to see if there is any miscalculation in HTTP header or some incorrect syntax that IE was sensitve to. Nothing...

I have then decided to put some break points and actually load data one bit at the time (our site consist of many AJAX queries) shortly after I have pin pointed the cause to one particular load.

Problem was caused by an iframe that was loading some content (to be displayed in tabs - not sure if this is related). I have changed URL of that iframe and it fixed the problem. So the final step was really to find out why the content the page caused IE to crash (even though if you load page in separate tab in IE it worked fine).


Problem turned out to be page that was loaded externally in the iframe. Page was pretty much Terms and Condition sort of page (full of <li> tags). Page had a lot of list nesting <ul> into <ol> and vice versa. Restructuring the page into DIVs and single lists fixed the problem. 

I'm still confused as to why IE9 and only that particular sub version would crash on something so simple. I expected JavaScript as we use many different frameworks etc but No simple list. Huh?

Friday, 28 September 2012

Chrome on Android - Permanent Desktop User Agent

I used to use my tablet quite sporadically to view website as there were no good browsers that really would provide me with the same experience as the desktop ones. However, once Chrome released their beta Android browser that has started to change. I'm slowly ditching my laptop and using my tablet to browse the web. Love it!

There is one little issue that I find with Chrome - it by default uses Mobile User Agent and a lot of websites redirect you to a mobile site. To mitigate that issue Google added a button in settings where you can "request desktop site". It is a good fix, however it doesn't stay permanently on and you have to do it per each site.

After some research I found an app that solves that problem - Chrome UA Switcher Lite.

Monday, 24 September 2012

DIV Overlay on Flash

I have had my client come up to me with a very weird issue that only seem to be happening in Firefox.

Website that I'm working on has a lot of overlays (mostly with iframes). When an overlaying window opens it normally greys out an area underneath it by using DIV that stretches across the whole screen (standard practise).

Problem: Main page has a large flash animation right in the center of the page. When overlay is showing everything on the background BUT the flash is being greyed out. Therefore the DIV is not covering the Flash object.

Browsers Affected:

  • Mozilla Firefox 15.0.1

    My first gut feeling was that z-index is not set correctly, however after quick play around with firebug I discovered that this was not the case here.

    Secondly I started playing around with Flash object tag since I have heard of WMode that is usually causing this sort of issues. I saw that parameter "WMode" is already set to "Transparent" which is what it should be.

    I had to dig deeper. After couple of hours of testing different approaches; order of divs, z-indexes, different parameters for object I finally found my missing puzzle.

    Both object parameter as well as embed tag need WMode set to transparent. Simply setting just object parameter doesn't work!

  • Wednesday, 11 July 2012

    Look & Feel / Masterpages for SharePoint 2010

    I have been editing recently our L&F of our SharePoint2010. I have created a new feature, everything works great but then I struggled with propagating it through out the site. (Very large number of site collections & sites)

    I found this blog to be very helpful.

    Found this to be quite helpful.

    Friday, 6 July 2012

    Who is blogging - Share Point 2010

    This week my task was to get "Who is blogging" web part organized on our main page. The purpose of this was to go over everyone's my sites to find most recent blogs from different people. Currently you actually have to go to people's my sites to find if they actually blogged anything new - not very practical if you don't know anyone that could be posting something interesting.

    After some research I have found that Search Core Results will be a perfect tool to do that.

    1. Go to a page that you would like to show people's blog posts (the most recent 3 in my case) and add new Search Core Results
    2. Select Edit Web Part
    3. Inside Location Properties
      1. Change Location to Local Search Results (make sure your Search Application is running and has been crawling your my sites). 
      2. Type in number of results you would like to see under "Results Per Page"
    4. Inside "Results Query Options"
      1. Change "Cross-Web Part query ID" to "Query 2"
      2. Enter
        contenttype:post AND NOT Title:"Welcome to your Blog!"
        in "Fixed Keyword Query"
    5. Click Apply/OK and you are Done!

    Note: The reason why "Welcome to your Blog!" is stated as part of the query is to stop who is blogging showing people that have just created their my sites. "Welcome to your Blog!" is default blog thats automatically created by Share Point 2010

    You can also fiddle with other settings such as cache and auto refresh. My next task is to make this look like all our other webparts (look & feel).

    Some references:

    To be continued...