Lunarpages Web Hosting Forum

Author Topic: For the Javascript Educated....  (Read 1033 times)

Offline ozdemir

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • http://www.dynadome.com
For the Javascript Educated....
« on: January 20, 2004, 08:44:43 AM »
Please tell me the purpose of the following script.  I ask this because this site was created for us by a web design company and removing this script from the html file does absolutely nothing.  so, since i heard somewhere that google doesn't like javascript (actually doesn't like our site at all!), i want to remove this from all of our html pages.  thanks


<script language="JavaScript" type="text/JavaScript">
<!--
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);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
Leader in Pool Enclosures - Dyna Products - www.dynadome.com
ozdemir@dynadome.com Email me

Danielle

  • Guest
For the Javascript Educated....
« Reply #1 on: January 20, 2004, 08:50:00 AM »
Hi Oz,

The script would only show something in Netscape Navigator 4.0 as it is for a resizing function when people resize the window (enlarge or make smaller) after the page is loaded.  It forces the page to reload I believe so that the new page doesn't appear cut off or look strange after the resizing.  I would keep it in the page, since many people use that same code for this Navigator issue on resizing.  If you remove it, anyone using 4.0 won't be able to resize your page and see it properly.  Of course, not many people even have 4.0 now, so you can take it out if you aren't concerned about how the page appears on that browser version.

I hope this helps.

Offline ozdemir

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • http://www.dynadome.com
For the Javascript Educated....
« Reply #2 on: January 20, 2004, 09:01:28 AM »
thanks again miraenda.  that's what i thought but i tried to duplicate it but i couldn't find a 4.0 version of netscape.  so i am going to remove it.

oz
Leader in Pool Enclosures - Dyna Products - www.dynadome.com
ozdemir@dynadome.com Email me