Welcome to WebmasterWorld Guest from 54.160.246.95

Forum Moderators: open

Message Too Old, No Replies

JavaScript

what's this?

     
8:27 am on Dec 17, 2001 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6669
votes: 130


Could someone please explain this?

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 innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

11:30 am on Dec 17, 2001 (gmt 0)

Preferred Member from ES 

10+ Year Member

joined:Feb 8, 2001
posts:582
votes: 0


Looks like the Dreamweaver command to fix some Netscape 4* rendering bug.

[cauzway.net...]

3:58 pm on Dec 17, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


Yup,

Thats right, normally if you try to resize Netscape the page can screw up especially if you are using layers.

So as soon as the window is made smaller/bigger this baby kicks in and refreshes the page and thus avoiding usual garbled Netscape page.

8:14 pm on Dec 17, 2001 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6669
votes: 130


Ah... thanks

This is set up as a JavaScript. Would this aid in pop-up windows made with JavaScript? And could this be run as a stand alone JavaScript called from the HEAD or is the rest of the Dreamweaver stuff required?

8:24 pm on Dec 17, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


It's just a JavaScript. It's only relation to Dreamweaver is the MM_ before everything.

You can use it anywhere you can use a JavaScript.

10:23 pm on Dec 17, 2001 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6669
votes: 130


>You can use it anywhere you can use a JavaScript.

Would/Should I remove the MM_s then?

10:35 pm on Dec 17, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


You don't have to. If you DO remove it, make sure you remove it everywhere it might look for it. Javascript is case sensitive
11:36 pm on Dec 17, 2001 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6669
votes: 130


Thanks again.

I have a lot of pop-up windows. I hope the NN4 users benefit by this.