Include Page Question

W

Whit

Hi - Probably a dumb question, but I'm confused. I'm using an "include page"
named navbar.htm to place a navigation menu on each web page. The nav menu
includes an "onmouseover" routine to swap images, and I'd like to preload
the images. Is it sufficient to place the preload script in the navbar.htm
code, or should it be placed in the code for the first "real" web page?
Thanks,
Whit
 
S

Steve Easton

Don't feel bad about being confused, because I've re written this three
times.
What happens if a viewer links to another page besides the first "Real"
page.

There has to be a method or instruction to run the preload script regardless
of which page is opened.
So I'm thinking: create an external javascript file with the preload
routine, with the main function named preload, and then reference the
function in the body of the include page like this.
<script type="javascript" src= myscript.js>
window.onload ="preload";
<script>

The external js file would contain:
<!---
function preload(){
the preload script goes here
}
--//>

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
S

Steve Easton

Oops.
The closing tag for the external js file needs to be
//--> instead of --//>

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
M

MrsSoto

re written? What the hell does that mean? Also, have you never heard of
saving something and then copying the content so you don't have to re
written it?
 
S

Steve Easton

Excuse me, maybe I should have said re-written.
That said ( comma ) I started to answer and changed my mind about what I
felt was the most simple and effective way to answer the question and
achieve the desired results.

Go ahead. Your turn.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
C

Crash Gordon

who the heck cares comma we all new whot u meant :)
....the internet grammar police.


| Excuse me, maybe I should have said re-written.
| That said ( comma ) I started to answer and changed my mind about what I
| felt was the most simple and effective way to answer the question and
| achieve the desired results.
|
| Go ahead. Your turn.
|
| --
| Steve Easton
| Microsoft MVP FrontPage
| 95isalive
| This site is best viewed............
| .......................with a computer
|
| | > re written? What the hell does that mean? Also, have you never heard of
| > saving something and then copying the content so you don't have to re
| > written it?
| > | > > Don't feel bad about being confused, because I've re written this three
| > > times.
| > > What happens if a viewer links to another page besides the first "Real"
| > > page.
| > >
| > > There has to be a method or instruction to run the preload script
| > regardless
| > > of which page is opened.
| > > So I'm thinking: create an external javascript file with the preload
| > > routine, with the main function named preload, and then reference the
| > > function in the body of the include page like this.
| > > <script type="javascript" src= myscript.js>
| > > window.onload ="preload";
| > > <script>
| > >
| > > The external js file would contain:
| > > <!---
| > > function preload(){
| > > the preload script goes here
| > > }
| > > --//>
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > > | > > > Hi - Probably a dumb question, but I'm confused. I'm using an "include
| > > page"
| > > > named navbar.htm to place a navigation menu on each web page. The nav
| > menu
| > > > includes an "onmouseover" routine to swap images, and I'd like to
| > preload
| > > > the images. Is it sufficient to place the preload script in the
| > navbar.htm
| > > > code, or should it be placed in the code for the first "real" web
| page?
| > > > Thanks,
| > > > Whit
| > > >
| > > >
| > >
| > >
| >
| >
|
|
 
S

Steve Easton

Uh oh, the news group hall monitor has arrived on the scene.
;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

who the heck cares comma we all new whot u meant :)
....the internet grammar police.


| Excuse me, maybe I should have said re-written.
| That said ( comma ) I started to answer and changed my mind about what I
| felt was the most simple and effective way to answer the question and
| achieve the desired results.
|
| Go ahead. Your turn.
|
| --
| Steve Easton
| Microsoft MVP FrontPage
| 95isalive
| This site is best viewed............
| .......................with a computer
|
| | > re written? What the hell does that mean? Also, have you never heard of
| > saving something and then copying the content so you don't have to re
| > written it?
| > | > > Don't feel bad about being confused, because I've re written this
three
| > > times.
| > > What happens if a viewer links to another page besides the first
"Real"
| > > page.
| > >
| > > There has to be a method or instruction to run the preload script
| > regardless
| > > of which page is opened.
| > > So I'm thinking: create an external javascript file with the preload
| > > routine, with the main function named preload, and then reference the
| > > function in the body of the include page like this.
| > > <script type="javascript" src= myscript.js>
| > > window.onload ="preload";
| > > <script>
| > >
| > > The external js file would contain:
| > > <!---
| > > function preload(){
| > > the preload script goes here
| > > }
| > > --//>
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > > | > > > Hi - Probably a dumb question, but I'm confused. I'm using an
"include
| > > page"
| > > > named navbar.htm to place a navigation menu on each web page. The
nav
| > menu
| > > > includes an "onmouseover" routine to swap images, and I'd like to
| > preload
| > > > the images. Is it sufficient to place the preload script in the
| > navbar.htm
| > > > code, or should it be placed in the code for the first "real" web
| page?
| > > > Thanks,
| > > > Whit
| > > >
| > > >
| > >
| > >
| >
| >
|
|
 
C

Crash Gordon

probably my old english teacher....shiver....yikes even the thought scares the heck outta me....ok steve let's diagram some sentences now!


| Uh oh, the news group hall monitor has arrived on the scene.
| ;-)
|
| --
| Steve Easton
| Microsoft MVP FrontPage
| 95isalive
| This site is best viewed............
| .......................with a computer
|
| | who the heck cares comma we all new whot u meant :)
| ...the internet grammar police.
|
|
| | | Excuse me, maybe I should have said re-written.
| | That said ( comma ) I started to answer and changed my mind about what I
| | felt was the most simple and effective way to answer the question and
| | achieve the desired results.
| |
| | Go ahead. Your turn.
| |
| | --
| | Steve Easton
| | Microsoft MVP FrontPage
| | 95isalive
| | This site is best viewed............
| | .......................with a computer
| |
| | | | > re written? What the hell does that mean? Also, have you never heard of
| | > saving something and then copying the content so you don't have to re
| | > written it?
| | > | | > > Don't feel bad about being confused, because I've re written this
| three
| | > > times.
| | > > What happens if a viewer links to another page besides the first
| "Real"
| | > > page.
| | > >
| | > > There has to be a method or instruction to run the preload script
| | > regardless
| | > > of which page is opened.
| | > > So I'm thinking: create an external javascript file with the preload
| | > > routine, with the main function named preload, and then reference the
| | > > function in the body of the include page like this.
| | > > <script type="javascript" src= myscript.js>
| | > > window.onload ="preload";
| | > > <script>
| | > >
| | > > The external js file would contain:
| | > > <!---
| | > > function preload(){
| | > > the preload script goes here
| | > > }
| | > > --//>
| | > >
| | > > --
| | > > Steve Easton
| | > > Microsoft MVP FrontPage
| | > > 95isalive
| | > > This site is best viewed............
| | > > .......................with a computer
| | > >
| | > > | | > > > Hi - Probably a dumb question, but I'm confused. I'm using an
| "include
| | > > page"
| | > > > named navbar.htm to place a navigation menu on each web page. The
| nav
| | > menu
| | > > > includes an "onmouseover" routine to swap images, and I'd like to
| | > preload
| | > > > the images. Is it sufficient to place the preload script in the
| | > navbar.htm
| | > > > code, or should it be placed in the code for the first "real" web
| | page?
| | > > > Thanks,
| | > > > Whit
| | > > >
| | > > >
| | > >
| | > >
| | >
| | >
| |
| |
|
|
 
W

Whit

Thanks, Steve. Makes sense to me.
Whit

Steve Easton said:
Don't feel bad about being confused, because I've re written this three
times.
What happens if a viewer links to another page besides the first "Real"
page.

There has to be a method or instruction to run the preload script regardless
of which page is opened.
So I'm thinking: create an external javascript file with the preload
routine, with the main function named preload, and then reference the
function in the body of the include page like this.
<script type="javascript" src= myscript.js>
window.onload ="preload";
<script>

The external js file would contain:
<!---
function preload(){
the preload script goes here
}
--//>

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
 
S

Steve Easton

OK, but let me dust off my Harbrace College Handbook first.
;-)
--
Steve Easton
MS MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
probably my old english teacher....shiver....yikes even the thought scares
the heck outta me....ok steve let's diagram some sentences now!


| Uh oh, the news group hall monitor has arrived on the scene.
| ;-)
|
| --
| Steve Easton
| Microsoft MVP FrontPage
| 95isalive
| This site is best viewed............
| .......................with a computer
|
| | who the heck cares comma we all new whot u meant :)
| ...the internet grammar police.
|
|
| | | Excuse me, maybe I should have said re-written.
| | That said ( comma ) I started to answer and changed my mind about what
I
| | felt was the most simple and effective way to answer the question and
| | achieve the desired results.
| |
| | Go ahead. Your turn.
| |
| | --
| | Steve Easton
| | Microsoft MVP FrontPage
| | 95isalive
| | This site is best viewed............
| | .......................with a computer
| |
| | | | > re written? What the hell does that mean? Also, have you never heard
of
| | > saving something and then copying the content so you don't have to re
| | > written it?
| | > | | > > Don't feel bad about being confused, because I've re written this
| three
| | > > times.
| | > > What happens if a viewer links to another page besides the first
| "Real"
| | > > page.
| | > >
| | > > There has to be a method or instruction to run the preload script
| | > regardless
| | > > of which page is opened.
| | > > So I'm thinking: create an external javascript file with the preload
| | > > routine, with the main function named preload, and then reference
the
| | > > function in the body of the include page like this.
| | > > <script type="javascript" src= myscript.js>
| | > > window.onload ="preload";
| | > > <script>
| | > >
| | > > The external js file would contain:
| | > > <!---
| | > > function preload(){
| | > > the preload script goes here
| | > > }
| | > > --//>
| | > >
| | > > --
| | > > Steve Easton
| | > > Microsoft MVP FrontPage
| | > > 95isalive
| | > > This site is best viewed............
| | > > .......................with a computer
| | > >
| | > > | | > > > Hi - Probably a dumb question, but I'm confused. I'm using an
| "include
| | > > page"
| | > > > named navbar.htm to place a navigation menu on each web page. The
| nav
| | > menu
| | > > > includes an "onmouseover" routine to swap images, and I'd like to
| | > preload
| | > > > the images. Is it sufficient to place the preload script in the
| | > navbar.htm
| | > > > code, or should it be placed in the code for the first "real" web
| | page?
| | > > > Thanks,
| | > > > Whit
| | > > >
| | > > >
| | > >
| | > >
| | >
| | >
| |
| |
|
|
 
J

Jon

Steve,
it should be
onload=preload;
(no quotes)
But FP adds the images to preload in the body tag, eg
<body onload="FP_preloadImgs(/*url*/'../images/pic.gif', etc
So what you'd need to do is add an extra function with the image names and
call that onload, so the above would be
<body>
<script type="text/javascript">
// your functions
function loadEm(){
FP_preloadImgs(/*url*/'../images/pic.gif', etc
}
onload=loadEm;

Has to be this way because onload= can't take arguments.

Jon
Microsoft MVP - FP
 
S

Steve Easton

Darn those "" thingies get me every time
;-)

Also, I was thinking he's not using an FP generated script so I went the
external js file route. Which "should" also work.
Right??

--
Steve Easton
MS MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top