I've a problem with a dynamic creation of frameset and frame, I'm write these simple script:
function createframe(){
var ahead = document.head;
var mainfs = document.createElement('FRAMESET');
mainfs.setAttribute("name", "mainframeset");
mainfs.setAttribute("id", "mfs");
mainfs.setAttribute("cols", "50,*");
ahead.appendChild(mainfs);
for ( var i = 0; i < 2; i++) {
var ifrm = document.createElement("IFRAME");
ifrm.setAttribute("src", "www.facebook.it");
document.getElementById('mfs').appendChild(ifrm);
}
And put in head of blank html page, but won't work!
any suggestion?