Rollover images staying after clicking on it!

  i have used the Swap Image to have a rollover, but when the person click on it, i would like that this roll-over image stay there so they can know that they are on that section. So it's not in the onMouseOver and not in onMouseOut i think eh?  Any idea how i can do that with Dreamweaver MX?


Who is Participating?
webwomanConnect With a Mentor Commented:
Basically, you make a new page, or send them to a new page.

That's the only way you're going to have the image not be a rollover anymore.

Think about it -- it's a link. They're going somewhere. They're NOT staying on the page. So you make a new one, where the image is NOT a link and NOT a rollover.

Generate it dynamically from a database (which is what m75t does) or simply load another page, it's the same thing.
the way that I 'use' this problem is that I make a if/then statement with a variable (like chapter or so).

so in the .asp page it would be like this;

<%if chapter="yes" then%>
  <img src="yes_active.gif">
  <a href="blabla.asp?chapter=yes"><img OnMouseOver ...></a>
<%end if%>

there are 2/3 pictures here, out / over & active. the out/and over pictures are used in the <%else%> part and the active picture in the first part. the rollover-images script is in the <%else%> part. in the first part there is no <a href> because you're not supposed to click when you are in 'that' chapter.

good luck, I hope my comment is clear for you!

I'm sorry, but I have to correct you because I don't want to frighten PUB UL.

my comment is vbscript, that's one of the 3 languages ultradev uses and it has nothing to do with a database ... It posts to the same page, but with another value of a variable. the same what you suggest, but then in one page.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

PUB_ULAuthor Commented:
Ok, but i am using frames... do i need to check what page is in the target? I understand what you mean, but it`s different by using frame. My menu is on the TOP frame and the main page is in another TARGET so... and i don`t want to reload a new menu on TOP for every page, i thought there was a way... so i`d like to know what you think about that problem. Sorry if i hadn`t been clear at the beginning.

Where do they go when they click on the rollover image? They have to go SOMEWHERE. THAT's where you turn off the link -- and the rollover.
frames / no frames, doesn't matter. if you place your target right, the link knows where to go ...
if you want these options (roll-over, roll-out / active) in the same top/menu-page, you'll have to use the vbscript example. this way you can stay in the same page and you don't have to make new ones with the active menu-items.

with vbscript the page becomes .asp (but that's what MX uses) which means you need hosting that can handle .asp.
PUB_ULAuthor Commented:

the url is
look at the top menu, i want it stay...

webwoman: I understand there is a link when they click on it and the page in the frame change. But how do you want me to turn it off without reloading the menu for each section?

m75t: i'll check your example... and hope it works..
Even with m75t's answer, you MUST reload the page for the script to be run. Unless you reload the page it won't change.
Since you're using ASP anyway, it would be better to lose the frames and use m75t's script as an INCLUDE on all the pages.
PUB_ULAuthor Commented:
Lose the frames? I need to keep frames...
Why? You have to reload BOTH pages if you want there to be any changes reflected in the menu. And if you have to do that all the time, it defeats the purpose of having the frames.

Server side includes will work as well or better, you still only have ONE file to maintain (it gets included on the pages), and your pages can be bookmarked better.
Although this questions is current, many others below are not.  You have 13 open questions today that need your attention.  ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101, Netminder, Mindphaser or I will return to finalize these as soon as possible if after 7 days no response by the Asker.  EXPERTS-->  please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link 
------> POINTS FOR EXPERTS awaiting comments are listed in the links below (Part 1) (Part 2)
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thanks everyone.
Moderator @ Experts Exchange
webwoman is right, if your choice of frames is for the loading-thing, than the frames have no use anymore. if you want this, you will always reload the pages ...
if you want to use frames to seperate the parts, this is still possible ...
Finalized by Moondancer - EE Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.