• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: image as checkbox?

image as checkbox? 14 years 2 months ago #9423

hi!
i want to be able to change the look of a checkbox. i want to use a small image instead of the default checkbox. how is it done?

look here:http://www.mygenerator.no/index.php?option=com_content&view=article&id=64.
the OK! checkbox needs to be a image.

...or maby its another way that is better, like just make the image show/hide fields, instead of making a changed checkbox do the job. but again...how?
Last Edit: 14 years 2 months ago by geir.ove.sandersen.
The administrator has disabled public write access.

Re:image as checkbox? 14 years 2 months ago #9429

if anybody wonders, this is the solution i ende up with. images that show/hide "stuff", it works like a charm:
       <script language=JavaScript>
       function swapImage(imagesrc,dividtag,stepstate) {
               var state=document.getElementById(stepstate).value;
               if(state=='hide'){
                       //show content
                       document.getElementById(stepstate).value="show";
                       imagesrc.src="images/bullet1.gif";
                       document.getElementById(dividtag).style.display="block";
                       return(false);
               } else {
                       //hide content
                       document.getElementById(stepstate).value="hide";
                       imagesrc.src="images/bullet2.gif";
                       document.getElementById(dividtag).style.display="none";
                       return(false);
               }
       }
       </script>
 
 
 
 
 
       <div style="clear:both;">
               <img id="img1" name="img1" src="bullet1.gif"
onclick="swapImage(img1,step1,step1state);">
               <input type="hidden" name="step1state" id="step1state" value="hide"/>
               <div id="step1" style="display:none;">
                       your text stuff...part 1
               </div>
       </div>
       <div style="clear:both;">
               <img id="img2" name="img2" src="bullet1.gif"
onclick="swapImage(img2,step2,step2state);">
               <input type="hidden" name="step2state" id="step2state" value="hide"/>
               <div id="step2" style="display:none;">
                       your text stuff...part 2
               </div>
       </div>
       <div style="clear:both;">
               <img id="img3" name="img3" src="bullet1.gif"
onclick="swapImage(img3,step3,step3state);">
               <input type="hidden" name="step3state" id="step3state" value="hide"/>
               <div id="step3" style="display:none;">
                       your text stuff...part 3
               </div>
       </div>
Last Edit: 14 years 2 months ago by geir.ove.sandersen.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!