If you don't know much about javascript, I'd recommend that you deal with that first.
Second, the approach that you have looked at might not work with DotNetNuke.
Third, you can find a Helper Skin Object
here. It might also offer the kind of functionality that you need.