Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nav 4 Resize Script?

Status
Not open for further replies.

desrev1

Technical User
Feb 2, 2004
16
US
People,

The "function MM_reloadPage(init) { file://reloads the window if Nav4
resized" script included w/ the basic page layout in Dreamweaver MX...

...is that really necessary?

In viewing code around the web, I don't believe I have ever seen it (except
in the pages I have created in DW.)

Thanks,

DesRev1
 
We use a esize script because of a navigation menu that is full width. You say this loads in a basic page?? Can you just open a new document and post the code here

Cheech

[Peace][Pipe]
 
Cheech,

No...DW automatically insterts it when layers are used. I opened up a basic html page, went to design view, inserted a layer; & this is the code:

---------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==&quot;Netscape&quot;)&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>

<div id=&quot;Layer1&quot; style=&quot;position:absolute; left:1px; top:1px; width:190px; height:96px; z-index:1&quot;></div>
</body>
</html>
----------------------------------------------------------------------------------

DesRev1
 
Cheech,

Thanks, man.

Once I looked at some of the guidelines from the tech note, it made me wonder...if you place elements in a fixed pixel sized table inside the layer (which was one of the suggestions for minimizing that issue), how does the layer react differently to a browser window resize?

For example, if I place an image inside a layer...the image is of a fixed size, right? So I am assuming they are referring to elements which can change position inside a layer, such as text. So with that, if the text were inside a table inside a layer, the layer could not then resize?

They lost me.

DesRev1
 
yes a fixed pixel defined table would not resize, you need to be aware of the layer positioning as well, the init script fixes that as well.

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top