Hi Mirian,
You should say "I realized my mistake when I had a look at the blog". You need to use the Past Simple of the verb 'realize' because 'when I had a look at the blog' is a finished time period (just like 'yesterday', '2 hours ago', 'in 2005' etc).
'I had a look' and 'I took a look' are both possible.
Jamie (www.italki.com/jamie.teacher)