Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-12-2003, 08:43 PM   PM User | #1
steviem
New to the CF scene

 
Join Date: Dec 2002
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
steviem is an unknown quantity at this point
any advice on this script?

Hi
I recently acquired a free website template off the net to use. However it came with a little bit of javascript in the code, and frankly I'm not sure what its purpose is, or if its important. Would someone be good enough to tell me if I can safely remove it?
Thanks
this is it - <script language="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);
// -->
</script>
steviem is offline   Reply With Quote
Old 01-12-2003, 08:47 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
That's Dreamweaver code (tip: the MM_ in the function name does not stand for Mickey Mouse ).

It's sort of a legacy feature that reloads the page for Netscape 4 browsers. This type of browser had an annoying bug that caused it not to redraw the layout if the browser had been resized under certain (don't ask me which) circumstances. Usually a reload was a counter-measure.

If you don't target NN4, then you can safely remove this code snippet.
mordred is offline   Reply With Quote
Old 01-12-2003, 09:36 PM   PM User | #3
steviem
New to the CF scene

 
Join Date: Dec 2002
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
steviem is an unknown quantity at this point
Thanks

Thanks for your helpful advice

Stephen
steviem is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:58 AM.


Advertisement
Log in to turn off these ads.