kurt <pe******@SPAMG UARDrocketmail. com> wrote in message news:<eq******* *************** **********@4ax. com>...
greetings,
I'm working on a bookmarklet that needs to overwrite the current
document with a frameset where the src of one of the frames is the
current URL.
I was able to get what you requested working in Netscape 7.2 too, but
not in IE 5.2.
I tried several approaches which are coded in frame2.html. I made a
button for each approach that I tried.
Maybe what I tried will be of some help to someone else figuring out
if this request is possible.
Robert
frames.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Frames Layout</title>
</head>
<frameset id="frameSetId " rows="50%,50%" border="0" frameborder="no " >
<frame src="frame1.htm l"
id="myframe1"
name="nameframe 1"
scrolling=yes>
<frame src="frame2.htm l"
id="myframe2"
name="nameframe 2"
scrolling=yes>
</frameset>
</html>
frame1.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Frame 1</title>
</head>
<body>
<p>This is frame 1.</p>
</body>
</html>
frame2.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Frame 2</title>
<script type="text/javascript">
function resizeFrame(per cent)
{
var node = top.document.ge tElementById("f rameSetId");
node.rows = percent;
}
function fullSize()
{
top.location.hr ef = "frame1.htm l";
}
</script>
</head>
<body>
<p>This is frame 2.</p>
<form>
<input type="button"
name="activate"
value="Both frames at 50%."
onclick="resize Frame('50%,50%' );">
<input type="button"
name="activate"
value="Enlarge upper frame to 75%."
onclick="resize Frame('75%,20%' );">
<input type="button"
name="activate"
value="Enlarge upper frame to 100%."
onclick="resize Frame('100%,0%' );">
<br>
<input type="button"
name="activate"
value="display only frame1.html"
onclick="fullSi ze();">
<br><br>
</form>
<a href="frame1.ht ml" target="_top">L ink only to frame1.html</a>
</body>
</html>