Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Text of Layer/Swap Image and Restore Conflicts

Status
Not open for further replies.

Muskieman5000

Programmer
Jan 19, 2008
1
US
Hello Everyone,

I'm brand new to this forum, thank you for taking the time to check this out!-)

Attempting to accomplish:
In a single parent browser window, I have a layer containing an image (that is viewable because it has already been initiated by a "set text of layer" behavior), and a text link that I would like to coordinate multiple behaviors.

Behavior 1: On Mouse over, swap image/restore of the currently viewed image

Behavior 2: On Click, Set text of layer to a different image

Behavior 3: On Click, Open new browser window containing new html page

Code:
<a href="slideShows/slideShow_CS_659HEHolidays.html" target="cs659HEHolidays" onclick="MM_openBrWindow('slideShows/slideShow_CS_659HEHolidays.html','cs659HEHolidays' ,'width=886,height=750');MM_setTextOfLayer('photoL ayer','','&lt;img src=&quot;assets/Portfolio_htmlImages/CS_659HEHolidays.jpg&quot; width=&quot;944&quot; height=&quot;403&quot;&gt;')" onmouseover="MM_swapImage('IMAGE_WITHOUT_ID','','a ssets/Portfolio_htmlImages/659HEHolidays.jpg',1)" onmouseout="MM_swapImgRestore()">Test 2</a>

Further explanation:
When I test this, noted Behaviors 2 and 3 work fine. However, I believe my swap image isn't responding because it's not finding a proper image ID, which is because the image itself is being brought in by a separate "Set Text of Layer" behavior (see "IMAGAE_WITHOUT_ID").

How can I code so that the swap image recognizes the correct image? Or, is there a simpler way of coding this whole thing?

Any help is appreciated. Thank you in advance!
 
Set text of layer to a different image"
-this should be either "show-hide layers" or set text layer...should not mix text and image (talking from MM perspetive). and so you are right about images ID

-if 2 & 3 are working then ur missing on step 1 a behavior of "on mouse out" vs. restore...
Restore was thought out for just disjoined-rollovers and rollovers period. When it comes to text you should use 'show-hide layers' or 'set text'
Take a look at this: for combo of both and examples that come along for some ideas.
Take care!

:--------------------------------------:
fugitive.gif


All around in my home town,
They tryin' to track me down...
|MostarNetworks|
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top