Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
kwong007 webforumsuser@macromedia.com #1
Dynamically Resizing Frames Help
Hello,
I am working on a implementation that dynamically resizes frames based off a client trigger. (in this case a textbox)
The implementation has nested framesets.
The javascript isnt working.
If there is anyone that can help me, I would greatly appreciate it.
There are four files.
1) Page1.htm - the main document
2) adbar.htm - a frame
3) main.htm - bottom frame - is a frameset that holds two additional frames
4) contents.htm - a bottom frame
5) main.htm - a bottom frame that is resized dynamically
adbar.htm
--------------
<HTML>
<TITLE>Sizing Framesets</TITLE>
<SCRIPT>
var hidden = false //Tracks the state
function buildFrameset(state) {
var str = "<TITLE>PSB Test</TITLE>"
// Get the main document being displayed
if (frames["main"].frames.length!=0)
bodyLoc = frames["main"].frames["body"].location.href
else
bodyLoc = frames["main"].location.href
if (state) {
// Display the frameset with the table of contents
str+="<FRAMESET COLS='200,*'>"
str+="<FRAME SRC='contents.htm'>"
str+="<FRAME SRC='"+bodyLoc+"' name=body>"
str+="</FRAMESET>"
frames["main"].document.open()
frames["main"].document.write(str)
frames["main"].document.close()
} else
// Do not display the frameset
frames["main"].location.href = bodyLoc
hidden = !(hidden)
}
function testCheckbox() {
// Initialize state
hidden = (frames["main"].frames.length!=0)
// Make sure frame exists
if (frames["main"].frames["body"].document.forms["f1"]!=null)
frames["main"].frames["body"].document.forms["f1"].elements["c1"].checked = hidden
}
window.onload=testCheckbox; </SCRIPT>
<FRAMESET ROWS='120,*' onLOAD="testCheckbox()">
<FRAME SRC='adbar.htm' name=header>
<FRAME SRC='main.htm' NAME=main>
</FRAMESET>
</HTML>
adbar.htm
-----------
<HTML>
<TITLE>Cross-Browser Pop-up Frames</TITLE>
<BODY>
</BODY>
</HTML>
main.htm
-------------
<HTML>
<TITLE>Article on sizing framesets</TITLE>
<FRAMESET COLS='200,*'>
<FRAME SRC='contents.htm'>
<FRAME SRC='body.htm' name=body>
</FRAMESET><noframes></noframes>
</HTML>
contents.htm
------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="216">
<param name="movie" value="splash.swf">
<param name="quality" value="high">
<embed src="splash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="216"></embed></object>
contents
</body>
</html>
main.htm
-----------
<HTML>
<TITLE>Article on sizing framesets</TITLE>
<FRAMESET COLS='200,*'>
<FRAME SRC='contents.htm'>
<FRAME SRC='body.htm' name=body>
</FRAMESET><noframes></noframes>
</HTML>
kwong007 webforumsuser@macromedia.com Guest
-
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created)
Ok here's my scenario. I have a Custom Composite Server Control (CCSC) consisting of a TextBox, Button & Panel. (And some other code - which I... -
Resizing Images Dynamically
Hey everyone, I need help on how to resize an image to a specified width. Normally I would use something like... <cfoutput><img... -
Web resizing help!!!!!!!!
I have a really "rookie" question to ask I'm trying to size a picture on photoshop (its a scan from a kodak cd) to thumbnail size for the web. The... -
Resizing
Hey, Does anybody know of a script or an extension that makes it so that when the window is resized the background in the main frame is resized... -
Resizing Frames
Hi, I'm teaching Dreamweaver, and several of my students (mac (os 9.2.2)AND pc (win2k) ) are having this problem: They are working with frames,...



Reply With Quote

