This is exactly what we are also trying to do. I followed your steps but am having some trouble with the HTML/Javascript code.
var val = window.parent.Xrm.Page.getAttribute("name").getValue();
returns null for me. I am trying to get the Account name.
Any tips? Do I need to include javascript libraries or add something special (e.g. a function) to the html?
I admit I am not a javascript pro.
Also CRM seems to edit my code even when I upload a html file as the web resource.
Any help would be much appreciated.
Eli