FP 2002 & JavaScript

D

David Ray

I have some Javascript that I use for rotating banner ads on web pages. I
would like to modularize this so that it can be simply "included" on any
page that I want to use the ads on.

So, I've created a separate page with nothing but the code required to load
& rotate the ads. Works great.

But if I include it using the FP2000 web component for including a page, it
doesn't work; it is as though the script isn't running at all. The script
is started with an "onLoad" handler in <body> of the page.

I know this is probably too vague, but if anyone can provide help I'll
appreciate it.

Thx..

David
 
T

Thomas A. Rowe

To use the FP Include Page component, all content that is to be included in other page, must be
inserted in the Include Page between the <body>..content..</body> tags. Content in the head section
or the actual opening <body> tag will not be included.

You could also look at using a external .js file for the script, however you will then need to add a
link to all page in the head section to call the external .js file.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
A

Andrew Murray

If you mean you want to include an external script file
you need to add it like

<script language = "javascript src="../scripts/yourscript.js">

in the <head> section

You can't use the include component or SSL for 'including scripts'.
 
T

Thomas A. Rowe

Both the FP Include Page component and SSI can be use to include scripts in other pages.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

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