Sorry, I don't know of a good way of explaining it but I'll try to expand on what I said on the first post. I have an open source HTML editor that I got from http://www.openwebware.com/. I am trying to add further functionality to it, like the ability to add YouTube videos, JavaApplets, templates, and so on.
I already created the YouTube button. When pressed, a popup page shows up by the following code: