brown2005 Posted February 20, 2007 Share Posted February 20, 2007 <form> <input type='checkbox' name='cababge' value='1'> <input type='checkbox' name='cababge' value='2'> <input type='checkbox' name='cababge' value='3'> </form> I have the above form with checkboxes... Wat i need to do is; Make the 3 checkboxes as an image say image1.gif and when i select them they will be image2.gif but i want them to work simultaneously Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/ Share on other sites More sharing options...
brown2005 Posted February 20, 2007 Author Share Posted February 20, 2007 there is no way to modify the above, it is radio buttons i want not check buttons Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189402 Share on other sites More sharing options...
fenway Posted February 20, 2007 Share Posted February 20, 2007 I'm confused... what do you want to happen? Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189431 Share on other sites More sharing options...
brown2005 Posted February 20, 2007 Author Share Posted February 20, 2007 instead of using radio buttons i want to use an image say if selected will have a tick in it and if not selected will have nothing. when i select 1 i want the other 2 to be not selected. Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189435 Share on other sites More sharing options...
ToonMariner Posted February 20, 2007 Share Posted February 20, 2007 You'll need a bit of javascript for this. leave the radio buttons there - either hide them with display: none or place the images over them using relative positioning. Add the onclick event to the image and call a function that selects the radio button.... Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189450 Share on other sites More sharing options...
dustinnoe Posted February 20, 2007 Share Posted February 20, 2007 Yes, use javascript, but first make your script functional with just html so that users with JS disabled will still have a functioning page. Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189513 Share on other sites More sharing options...
ToonMariner Posted February 20, 2007 Share Posted February 20, 2007 to re-inforce dustinnoe's comment - you should infact use javascript to show these images and place them over the radio buttons - that way if js is off the user will still be able to make a selection. Link to comment https://forums.phpfreaks.com/topic/39289-using-image-instead-of-checkbox/#findComment-189514 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.