boo_lolly Posted December 28, 2007 Share Posted December 28, 2007 i've seen this user-friendly functionality in a lot of sites. there is a checkbox in a form and some text next to it explaining what the checkbox is for. you can click the adjacent text (which is much easier to target) and it checks, or unchecks the checkbox. i googled it and found this link http://www.askdavetaylor.com/make_text_adjacent_to_checkbox_clickable.html it provided this code: <form name="f1"> Modifications to your coffee order:<br > <input type="checkbox" name="cb1"> <span onClick="document.f1.cb1.checked=(! document.f1.cb1.checked);"> Add whipped cream to your drink (add $0.50)</span> </form> and mine lookes like this: <form name="f1"> <input type="checkbox" name="mailinglist"> <span onClick="document.f1.mailinglist.checked=(! document.f1.mailinglist.checked);"> Join our mailing list to receive updates and last-minute specials and more! </span> </form> it doesn't work. is there a newer method of doing this? i'm not sure what the problem is here. it looks like everything makes sense. any help? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 28, 2007 Share Posted December 28, 2007 it works fine in IE6 and FF - I did not test in IE7 (maybe that was the browser that the script was not working for you in) - but at any rate; it works like it is supposed to. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted December 28, 2007 Author Share Posted December 28, 2007 you're right it works just fine. i was having file saving issues. sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.