replacing checkboxes with images |
[eluser]bibiki[/eluser]
Hey there, could someone guide me on how to replace checkboxes with images. I want users to be able to make their selections based on images they see instead of checking as <input type='checkbox'/> makes possible. I know I need to use javascript, but do I need to pass that javascript to form_checkbox(), or do I do that referencing some javascript file on top of my html/php file? thank you in advance.
[eluser]Mauricio de Abreu Antunes[/eluser]
Ok, do you need to click the image for this? If not: Code: function checkBoxByImage(checkBoxId) { In your PHP loop for print images/checkbox, print the id in your image tag. Code: <img src="myassisburning.jpg" /> //Call javascript function here with id below EDIT: sorry, editor blocked my "javascript call"
[eluser]CroNiX[/eluser]
http://filamentgroup.com/lab/accessible_...ss_jquery/
[eluser]bibiki[/eluser]
Hey friends, thank you for your prompt replies. This seems to be making sense. thanks again.
[eluser]Mauricio de Abreu Antunes[/eluser]
Lemme know if my code example worked fine. %-P
[eluser]bibiki[/eluser]
Hey Mauricio, I just wanted to let you know that I still do not have anything working as far as this issue goes. I thought I'd leave this for when I get to making my app pretty. Besides, I am not sure using checkboxes is the right way to do what I am trying to do. The number of options to select will vary over time. As a result, I'd better use multiselect. However, CI's multiselect seems a little hard to use. I can not seem to make selection of more than two options possible. When I pass on to code further the selections, what I get is one option select only. Anyways, just wanted to let you know how everything went as you asked to be informed. Kind regards.
|
Welcome Guest, Not a member yet? Register Sign In |