Link to home
Start Free TrialLog in
Avatar of RichardKline
RichardKline

asked on

How to change image within MS Ajax Accordion control header upon mouse click

customer has requested that plus-sign / minus-sign images be used in individual accordion panel headers to indicate that the panel can be expanded or contracted.
The current ASPX code reads:
<Header><a href="" onclick="return false;"><strong>1. <em>Enable</em></strong> Access For New User</a></Header>
Am I right that this has to happen?
1.  Insert image with ID tag within the header.
2. Change the onclick event code to perform a real JavaScript function which changes the image's URL property.
3. Return false from the JavaScript function so as not to kill the normal Accordion operations.

Can anyone point me toward or supply a sample as how to make it work?

Thank you.
Richard
ASKER CERTIFIED SOLUTION
Avatar of Airyck666
Airyck666
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RichardKline
RichardKline

ASKER

This worked perfectly fine!
One minor correction.  Switch the Collapse/Expand images locations.   Expand belongs with default.  Collapsed belongs with the SelectedHeader.

This CSS solution is much preferred.