Layers/behaviors

M

Myriam

I am trying to swap visible text on click and mouseout.
I have a button and 2 layers w/text.
With one layer, it works as intended, shows the first layer ok, mouseover,
it hides it. But I cannot seem to make the 2nd layer work properly. It
should be visible when the 1st is invisible and viceversa.
Could anyone please give me an idea of how to do this?
Thanks!
 
M

Murray

Show me your page, please.

FP has no facility for orchestrating this kind of toggle, but there may be
other ways that would work, depending on what you have made....
 
M

Myriam

When I added the second layer the whole page got corrupted. Here is a quick
example of what's going on. An interactive button should show text on click.
It does as long as I don't place another link on the page (?)
----------------------------------------------
<body onload="FP_preloadImgs(/*url*/'button7D.jpg', /*url*/'button7E.jpg')">
<p onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'Text1',1,'style.visibility','visible')">
<a href="javascript:;">
<img border="0" id="img1" src="button7C.jpg" height="20" width="100"
alt="Button Text"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button7D.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button7C.jpg');
FP_changePropRestore()"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button7E.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button7D.jpg')"
fp-style="fp-btn: Embossed Capsule 8" fp-title="Button Text"
onclick="FP_changeProp(/*id*/'Text1',1,'style.visibility','visible');"></a></p>
<div style="position: absolute; width: 100px; height: 100px; z-index: 1;
visibility: hidden" id="Text1" onmouseout="FP_changePropRestore()"
onclick="FP_changeProp(/*id*/'layer1',1,'style.visibility','visible')">
This is test1, with text layer.</div>
<p> </p>
<p> </p>
<p> </p>
<p onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'Text1',1,'style.visibility','visible')">
<a href="javascript:;" onmouseout="FP_changePropRestore()"
onclick="FP_changeProp(/*id*/'Text2',1,'style.visibility','visible')">
This_is_2_Behaviors</a></p>
<div style="position: absolute; width: 100px; height: 100px; z-index: 2;
visibility: hidden; left:55px; top:206px" id="Text2">
This is test 2, this text should become invisible as the title becomes
visible.</div>
<p>
</p>
<div style="position: absolute; width: 100px; height: 100px; z-index: 3;
left: 82px; top: 204px; visibility: visible" id="title"
onmouseout="FP_changePropRestore()"
onclick="FP_changeProp(/*id*/'Text1',1,'style.visibility','hidden')">
THIS IS THE TITLE</div>
-------------------------------------------------------
 
M

Murray

There's lots of bewildering and strange stuff in there -

<p onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'Text1',1,'style.visibility','visible')">

You can't apply events/behaviors to <p> tags.

<div style="position: absolute; width: 100px; height: 100px; z-index: 1;
visibility: hidden" id="Text1" onmouseout="FP_changePropRestore()"
onclick="FP_changeProp(/*id*/'layer1',1,'style.visibility','visible')">

You shouldn't apply behaviors/events to <div> tags.

Also you have a confusing array of mouseover and onclick events which seem
to be doing the same thing.

Tell me the interactivity you'd like on this page, e.g.,

onClick link1 - layer1 shows and layer2 hides
onClick link2 - layer1 hides and layer2 shows

Something like that....
 
M

Myriam

I am really new at this, and I am using mainly the FT2003 built ins... and
some behaviors

Yes, what I need is:

Click link1 - layer1 shows and layer2 hides
onmouseout - layer1 hides and layer2 shows

And, I'll have several of these links on one page i.e., link1, link2, link3,
etc.

Thanks for taking a look at this. I really appreciate it.
 

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