PC Review


Reply
Thread Tools Rate Thread

Can I have behaviors in an included file in Frontpage 2003?

 
 
Steve Graham
Guest
Posts: n/a
 
      6th Jun 2004
I have a fairly simple include file that I use to display a standard
menu on each page of my website. The include file just has a one row
table with a different graphic in each cell, each cell is a menu
option and hyperling to a different page.

I have associated a swap image behavior to each graphic so that the
image changes when the user Mouses Over it.

I include the page in my main web page and it works fine when I
preview it in Frontpage, but, when I upload it to my Frontpage enabled
web server, as soon as I mouse over the graphic I get a Runtime Error,
Error: Object Expected.

What I think is happening is that the code to handle the image swaps
is being generated in the file I am including. When I include it in my
main page, the code is being included half way down the page in
amongst all of the standard HTML formatting tags so when I mouse over
the graphic and it looks for the swap image function it can't find it
in the right place at the top of the document and hence the Error:
Object Expected message.

Am I right? More importantly, can I use behaviors in an include file
and if so how?

Thanks

Steve
 
Reply With Quote
 
 
 
 
Thomas A. Rowe
Guest
Posts: n/a
 
      6th Jun 2004
Not possible when FP is writing the JavaScript code. You would need to use a 3rd Party JavaScript
mouse over script that can either be placed in the head section of each page using the include or
between the body tags of the include page or a external .js file which is link to all pages using
the include.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Steve Graham" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a fairly simple include file that I use to display a standard
> menu on each page of my website. The include file just has a one row
> table with a different graphic in each cell, each cell is a menu
> option and hyperling to a different page.
>
> I have associated a swap image behavior to each graphic so that the
> image changes when the user Mouses Over it.
>
> I include the page in my main web page and it works fine when I
> preview it in Frontpage, but, when I upload it to my Frontpage enabled
> web server, as soon as I mouse over the graphic I get a Runtime Error,
> Error: Object Expected.
>
> What I think is happening is that the code to handle the image swaps
> is being generated in the file I am including. When I include it in my
> main page, the code is being included half way down the page in
> amongst all of the standard HTML formatting tags so when I mouse over
> the graphic and it looks for the swap image function it can't find it
> in the right place at the top of the document and hence the Error:
> Object Expected message.
>
> Am I right? More importantly, can I use behaviors in an include file
> and if so how?
>
> Thanks
>
> Steve



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      6th Jun 2004
Consider using the Dynamic Web Template.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message news:eeknj7%(E-Mail Removed)...
> Not possible when FP is writing the JavaScript code. You would need to use a 3rd Party JavaScript
> mouse over script that can either be placed in the head section of each page using the include or
> between the body tags of the include page or a external .js file which is link to all pages using
> the include.
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Steve Graham" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a fairly simple include file that I use to display a standard
> > menu on each page of my website. The include file just has a one row
> > table with a different graphic in each cell, each cell is a menu
> > option and hyperling to a different page.
> >
> > I have associated a swap image behavior to each graphic so that the
> > image changes when the user Mouses Over it.
> >
> > I include the page in my main web page and it works fine when I
> > preview it in Frontpage, but, when I upload it to my Frontpage enabled
> > web server, as soon as I mouse over the graphic I get a Runtime Error,
> > Error: Object Expected.
> >
> > What I think is happening is that the code to handle the image swaps
> > is being generated in the file I am including. When I include it in my
> > main page, the code is being included half way down the page in
> > amongst all of the standard HTML formatting tags so when I mouse over
> > the graphic and it looks for the swap image function it can't find it
> > in the right place at the top of the document and hence the Error:
> > Object Expected message.
> >
> > Am I right? More importantly, can I use behaviors in an include file
> > and if so how?
> >
> > Thanks
> >
> > Steve

>
>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      6th Jun 2004
If you are using FrontPage 2003 swap image behaviour then Yes, you can use
the Swap Image behaviour in include pages, with limitations. The
JavaScript in the <head> section will be correctly generated in all pages
using the include, but the image paths used in the onmouseover and
onmouseout events may not be correct. See
www.rxs-enterprises.com/fp/b/buttons/ which demonstrates some of the
problems involved using Interactive Buttons - some of these problems are
also relevant to the Swap Image behaviour.

In testing, I could not replicate your "object expected" problem, and all
image paths were correctly written by FP (which does not always happen with
Interactive Buttons).
--
Ron
Reply only to group - emails will be deleted unread.

"Steve Graham" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a fairly simple include file that I use to display a standard
> menu on each page of my website. The include file just has a one row
> table with a different graphic in each cell, each cell is a menu
> option and hyperling to a different page.
>
> I have associated a swap image behavior to each graphic so that the
> image changes when the user Mouses Over it.
>
> I include the page in my main web page and it works fine when I
> preview it in Frontpage, but, when I upload it to my Frontpage enabled
> web server, as soon as I mouse over the graphic I get a Runtime Error,
> Error: Object Expected.
>
> What I think is happening is that the code to handle the image swaps
> is being generated in the file I am including. When I include it in my
> main page, the code is being included half way down the page in
> amongst all of the standard HTML formatting tags so when I mouse over
> the graphic and it looks for the swap image function it can't find it
> in the right place at the top of the document and hence the Error:
> Object Expected message.
>
> Am I right? More importantly, can I use behaviors in an include file
> and if so how?
>
> Thanks
>
> Steve



 
Reply With Quote
 
Andrew Murray
Guest
Posts: n/a
 
      7th Jun 2004
I've done a similar thing.....I have a page called 'heading.htm' which is the
page banner/title/menu, including rollover images (using the rollover/image swap
feature in FP 2002).

I use the shared top border, into which I put the included content (page) i.e.
the included page heading.htm inside _borders/top.htm (if that makes sense) and
the rollover images work fine. You could try this....

Otherwise I don't know.


"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:eeknj7%(E-Mail Removed)...
> Not possible when FP is writing the JavaScript code. You would need to use a

3rd Party JavaScript
> mouse over script that can either be placed in the head section of each page

using the include or
> between the body tags of the include page or a external .js file which is link

to all pages using
> the include.
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Steve Graham" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a fairly simple include file that I use to display a standard
> > menu on each page of my website. The include file just has a one row
> > table with a different graphic in each cell, each cell is a menu
> > option and hyperling to a different page.
> >
> > I have associated a swap image behavior to each graphic so that the
> > image changes when the user Mouses Over it.
> >
> > I include the page in my main web page and it works fine when I
> > preview it in Frontpage, but, when I upload it to my Frontpage enabled
> > web server, as soon as I mouse over the graphic I get a Runtime Error,
> > Error: Object Expected.
> >
> > What I think is happening is that the code to handle the image swaps
> > is being generated in the file I am including. When I include it in my
> > main page, the code is being included half way down the page in
> > amongst all of the standard HTML formatting tags so when I mouse over
> > the graphic and it looks for the swap image function it can't find it
> > in the right place at the top of the document and hence the Error:
> > Object Expected message.
> >
> > Am I right? More importantly, can I use behaviors in an include file
> > and if so how?
> >
> > Thanks
> >
> > Steve

>
>



 
Reply With Quote
 
Alec Usticke
Guest
Posts: n/a
 
      18th Jun 2004
On Sun, 6 Jun 2004 20:06:51 +0100, "Ronx" <(E-Mail Removed)> wrote
in Message-ID <#bOpul$(E-Mail Removed)>:

> If you are using FrontPage 2003 swap image behaviour then Yes, you can use
> the Swap Image behaviour in include pages, with limitations. The
> JavaScript in the <head> section will be correctly generated in all pages
> using the include, but the image paths used in the onmouseover and
> onmouseout events may not be correct. See
> www.rxs-enterprises.com/fp/b/buttons/ which demonstrates some of the
> problems involved using Interactive Buttons - some of these problems are
> also relevant to the Swap Image behaviour.


I got around this problem by going into Code and replacing all /*url*/
links with direct ones, e.g., I changed /*url*/'button18.jpg' to
'http:/www.usticke.org/menu/button18.jpg'. It seems to work fine; it
works from the root and all directories.

Besides the issue of maintenance -- I'll need to update the Code each
time I make changes -- do you see any potential problems with this
workaround?

--
=''' Alec Usticke
c-OO (E-Mail Removed)
\ http://www.usticke.org
-
 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      18th Jun 2004
That workaround should not pose any problems, apart from (as you said)
maintenance. You could shorten the URL to '/menu/button18.jpg' (note the
slash before menu).
Ron
--
Reply only to group - emails will be deleted unread.

Alec Usticke" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sun, 6 Jun 2004 20:06:51 +0100, "Ronx" <(E-Mail Removed)> wrote
> in Message-ID <#bOpul$(E-Mail Removed)>:
>
> > If you are using FrontPage 2003 swap image behaviour then Yes, you can

use
> > the Swap Image behaviour in include pages, with limitations. The
> > JavaScript in the <head> section will be correctly generated in all

pages
> > using the include, but the image paths used in the onmouseover and
> > onmouseout events may not be correct. See
> > www.rxs-enterprises.com/fp/b/buttons/ which demonstrates some of the
> > problems involved using Interactive Buttons - some of these problems are
> > also relevant to the Swap Image behaviour.

>
> I got around this problem by going into Code and replacing all /*url*/
> links with direct ones, e.g., I changed /*url*/'button18.jpg' to
> 'http:/www.usticke.org/menu/button18.jpg'. It seems to work fine; it
> works from the root and all directories.
>
> Besides the issue of maintenance -- I'll need to update the Code each
> time I make changes -- do you see any potential problems with this
> workaround?
>
> --
> =''' Alec Usticke
> c-OO (E-Mail Removed)
> \ http://www.usticke.org
> -



 
Reply With Quote
 
Alec Usticke
Guest
Posts: n/a
 
      18th Jun 2004
Thanks. That web page had me scared that there wasn't a practical
solution, but this works like a charm.


On Fri, 18 Jun 2004 11:15:19 +0100, "Ronx" <(E-Mail Removed)> wrote
in Message-ID <#(E-Mail Removed)>:

> That workaround should not pose any problems, apart from (as you said)
> maintenance. You could shorten the URL to '/menu/button18.jpg' (note the
> slash before menu).
> Ron
> --
> Reply only to group - emails will be deleted unread.
>
> Alec Usticke" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > On Sun, 6 Jun 2004 20:06:51 +0100, "Ronx" <(E-Mail Removed)> wrote
> > in Message-ID <#bOpul$(E-Mail Removed)>:
> >
> > > If you are using FrontPage 2003 swap image behaviour then Yes, you can

> use
> > > the Swap Image behaviour in include pages, with limitations. The
> > > JavaScript in the <head> section will be correctly generated in all

> pages
> > > using the include, but the image paths used in the onmouseover and
> > > onmouseout events may not be correct. See
> > > www.rxs-enterprises.com/fp/b/buttons/ which demonstrates some of the
> > > problems involved using Interactive Buttons - some of these problems are
> > > also relevant to the Swap Image behaviour.

> >
> > I got around this problem by going into Code and replacing all /*url*/
> > links with direct ones, e.g., I changed /*url*/'button18.jpg' to
> > 'http:/www.usticke.org/menu/button18.jpg'. It seems to work fine; it
> > works from the root and all directories.
> >
> > Besides the issue of maintenance -- I'll need to update the Code each
> > time I make changes -- do you see any potential problems with this
> > workaround?
> >


--
=''' Alec Usticke
c-OO (E-Mail Removed)
\ http://www.usticke.org
-
 
Reply With Quote
 
 
 
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using behaviors in FrontPage 2003 =?Utf-8?B?SmFuUmVkRG9n?= Microsoft Frontpage 2 14th Apr 2005 11:30 AM
how to create behaviors in frontpage 2003? =?Utf-8?B?dGFuZGVt?= Microsoft Frontpage 1 8th Feb 2005 11:18 AM
Getting New Behaviors in Front Page 2003 Behaviors List =?Utf-8?B?Vmlja21uYzg0?= Microsoft Frontpage 1 25th Jul 2004 10:06 AM
FrontPage 2003 Behaviors =?Utf-8?B?TWF0dGhldw==?= Microsoft Frontpage 4 31st Mar 2004 05:41 AM
Re: FrontPage 2003 Problems run Behaviors insert MD WebsUnlimited.com Microsoft Frontpage 0 6th Oct 2003 07:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:16 PM.