Forum Moderators: open

Message Too Old, No Replies

Dreamweaver - default HEAD section on new pages

Is this necessary code?

         

fashezee

2:09 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Whenever I begin a new site in dreamweaver; the following code is added in the <HEAD> section of the document:
---------------------------------------------
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW ¦¦
etc.....
---------------------------------------------

What does this code do; and is it necessary?
Is there a way of removing this code in any preferences so that it doesn't automatically insert itself?

Any clarificaton on this matter would be much appreciated.

tedster

2:17 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's code for Netscape 4. When a page is resized in NN4, any dynamic content can get messed up. So this is JavaScript to check for a window resize in NN4 and reload the page.

Do you need it? It depends on what you have on your page.

Can you change Dreamweaver default page? I'm sure you can, but I'm not a DW guy. But you are in luck -- lots of DW users hang out here. I'm sure that help is on the way.

Liane

2:24 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am by no means an expert, but am a Dreamweaver user. If you are appealing to an audience that is likely to use older browsers from Netscape (or AOL users) ... you might want to consider keeping it.

However, I am sure someone here will have another solution for you.

Black Knight

2:25 am on Mar 20, 2002 (gmt 0)

10+ Year Member



Yeah, that option is in the, er, options. :)

It is the Netscape Resize Bug Fix, only really needed if you are using layers or CSS positioning. If not, then disable it by unchecking the box in your preferences.

Ammon Johns

fashezee

2:35 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good stuff!! I'm in my preferences as we speak.

Thx

DrOliver

7:19 am on Mar 20, 2002 (gmt 0)

10+ Year Member



If you can't find it there, you can always change the default file: it's in:

c:/program files/dreamweaver 4/configuration/templates

and it is called default.html. What is bold is depending on your settings.

Make a backup copy of it and then you can change what is initially loaded when you create a new file.