Problem: in a given frameset I need to "change" a row-frame with a
nested frameset so that I can use the extra width for a widescreen.
ORIGINAL FRAMESET:
<frameset rows="100,50,*">
<frame src="row01.html" name="row01">
<frame src="row02.html" name="row02">
<frame src="row03.html" name="row03">
</frameset>
DESIRED FRAMESET:
<frameset rows="100,50,*">
<frame src="row01.html">
<frame src="row02.html">
<frameset cols="*,900">
<frame src="row03side.html">
<frame src="row03.html">
</frameset>
</frameset>
MY CODE:
var frmst = document.getElementsByTagName('frameset');
var subframe = document.createElement("frameset");
subframe.cols = "*,900";
var sidepanel = document.createElement("frame");
sidepanel.setAttribute("src","row03side.html");
sidepanel.setAttribute("name","row03side");
subframe.appendChild(sidepanel);
var original = frmst[0].lastChild; //assuming my frameset is the first
one
subframe.appendChild(original);
frmst[0].removeChild(frmst[0].lastChild);
frmst[0].appendChild(subframe);
NOTES:
1) if I only append subframe without removing lastchild everything
seems to work fine (except I see a double row03 frame!!)
2) I'm a total newbie in js!!
Any hint appreciated.
Thanks,
UD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---