473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

MM_reloadPage in external file

Pat
The standard Dreamweaver script for repairing the Netscape resizing bug
seems to be a waste of bandwidth. Is there a reason no one moves this
script to an external file ? Wouldn't the following work?

<HEAD> ...
<SCRIPT SRC="netscaperesize.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript"><!--
MM_reloadPage(true); //--></SCRIPT>
</HEAD>
...

//------- Contents of netscaperesize.js -------------------
function MM_reloadPage(init) { //reloads window if Navigator v4
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(); }

Jul 23 '05 #1
4 8373
Pat wrote:
The standard Dreamweaver script for repairing the Netscape resizing bug
seems to be a waste of bandwidth.
99% of the garbage, oops, "code", spit out by DreamWeaver is a waste of
bandwidth.
Is there a reason no one moves this script to an external file ?
Because most people that use DW's built in crap, oops - scripts, either
don't understand enough or realize it doesn't matter. Whether its
internal or external, the only way to save the bandwidth is to serve it
only to browsers that need it.
Wouldn't the following work?
"work", yes. Do what you think it would, no.
<HEAD> ...
<SCRIPT SRC="netscaperesize.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript"><!--
MM_reloadPage(true); //--></SCRIPT>
</HEAD>
...

//------- Contents of netscaperesize.js -------------------
function MM_reloadPage(init) { //reloads window if Navigator v4
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(); }

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2
Pat wrote:
The standard Dreamweaver script for repairing the Netscape resizing bug
seems to be a waste of bandwidth.


Given the current market share of Netscape 4, and the fact that the script
is there for (as far as I know) purely cosmetic reasons - I'd agree that
its a waste of bandwidth and get rid of it entirely.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3
Pat wrote:
The standard Dreamweaver script [...] seems to be a waste of bandwidth.
Is there a reason no one moves this script to an external file ?


Is there a reason to use Macromedia garbage?
PointedEars
Jul 23 '05 #4
Thomas 'PointedEars' Lahn wrote:
Pat wrote:

The standard Dreamweaver script [...] seems to be a waste of bandwidth.
Is there a reason no one moves this script to an external file ?

Is there a reason to use Macromedia garbage?


Because it produces some garbage that validates better than your website
did the last time I tried to validate it? Or is it the same reason you
use to reply to threads that are a week old which is eternity in terms
of Usenet?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Christopher Benson-Manica | last post by:
Just FMI, if an external stylesheet is linked to a page (with <link>), will subsequent <style> tags override the values in the external stylesheet? -- Christopher Benson-Manica | I *should*...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
4
by: Peter Ammon | last post by:
I would like to share a variable between two functions defined in two separate source files; no other functions will need the global variable so I'd prefer to not give it file scope. Thus, I want...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
1
by: Brian Kendig | last post by:
I've got some questions about using an external javascript file, included via '<script type="text/javascript" src="mycode.js" ></ script>': (1) If I define a function "myFunction()" in the...
2
by: murthydb2 | last post by:
Hi My requirement is that i have to write a stored procedure in db2 and that will be executed in a batch file . Any system error or validation error that occurs inside the db2 sp during...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.