Why do the buttons on my menu bars keep changing themselves

C

curlykat

Each time I add a new button to my menu, the rest change too, leaving me with
3-4 all reading the same. The more I try and correct them, the worse it gets.
 
A

Andrew Murray

I think I can explain this, I've had it do this on my sites as well. I
believe it is to do with a problem with the "name" each button is given,
which is referenced in the script which makes the rollover work. The
problem occurs if you use FP include pages, or possibly other things like
standard SSI (server side includes) or shared borders

I'm assuming you mean *interactive buttons* in FP 2003; go to code view and
change all the buttons to have unique names

Refer to the sample code below: Note two buttons, within the code is the
reference to "img1" and "img2" - these need to be unique for each button.
Make sure no two buttons have the same "img" name rename them in code view
in order eg img1, img2, img3 etc for each button.

Hope I explained this ok.

There is a way to do this through the GUI, but I forget how to do it.
(Under "Behaviours" I think). Select the button; go to Format > Behaviours,
and see the list in the task pane on RHS of the screen, double click each
"behaviour" (onMouseDown, onMouseOver, OnMouseUp, onMouseOut etc). and see
the reference "img1", "Img2" listed for each button.

In my experience, I've had this problem; the above solution fixed it. I
think it comes from the fact that if you have buttons on for example an
include page, and on the main page, the interactive button wizard starts at
"img1" for each page; so if you have an include page with "img1", "img2"
etc, and the main page also contains "img1", "img2" etc, it gets confused
and swaps the wrong button, and won't recognise there is already an
img1/img2 when you insert the include page, and adjust accordingly (which I
think it should do, at least warn you there is duplicate identifiers what
will cause the scripts to not work correctly).

I don't know if it's a bug; it might be just the way it works, and just
requires a few adjustments as described above in the code.

<!-- begin button 1-->
<p>
<img border="0" id="img1"
src="file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button1.jpg"
height="20" width="100" alt="Button Text"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button2.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button1.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button3.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button2.jpg')"
fp-style="fp-btn: Border Bottom 8" fp-title="Button Text"></p>
<p>
<!---end button 1-->

<!--begin button 2-->
<img border="0" id="img2"
src="file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button1.jpg"
height="20" width="100" alt="Button Text"
onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button2.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button1.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button3.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'file:///F:/Documents%20and%20Settings/Andrew%20Murray/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/button2.jpg')"
fp-style="fp-btn: Border Bottom 8; fp-orig: 0" fp-title="Button Text"></p>
<!-- end button 2-->


If anyone else has a solution or explanation, please contribute....
 
Top