HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Changer button color after on click
Changer button color after on click
  View type:
Hello, I create a slide with 10 buttons. Each button redirect to a question. Is it possible to change button color after click ?

Thanks
 
I don't know about changing the color of buttons, but how to change the color of a text might help:

Define a Textbox and in html-mode enter:
<SPAN style="FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 12px" id=dt2>DummyText</SPAN>

Use javascript to change the color of the text:
document.getElementById('dt2').style.color = '#0000ff';
The word 'Dummyext' will change color.
 
 
In that case, the "dt2" is the object name ?
Per example, if I have a button object. This object name is "OBJ_10", I will do document.getElementById('OBJ_10').style.color = '#0000ff'; ?

Thanks
 
 
 
Never used it on a button, but you could give it a try [;)]
 
 
Is that change the button when it's clicked to have an on=click state OR have the colour change and remain changed after a click and presumably navigation to a block of pages.
A lot depends on how you construct the module and organise the navigation.
Example a non-linear construction using a single page that loops out to functional pages then back to the original. This needs you to have a variable which is set once you loop through the sub sections. The varuable is used to define the button set used.
+++
If you have a linear progrsion, one core repeated page with the content between them, then just change buttons as you run through the pages.
So that'll be a yes it depends how you make the module work and how complicated you want it all to be.
Subject:
Message options
No additional options