BoltZ Posted October 25, 2008 Share Posted October 25, 2008 Hi I want to have it so the button is unclickable unless the user presses the checkbox button then it makes it so the button is clickable. Anyone know what i am talking about/ know how to do it? Quote Link to comment Share on other sites More sharing options...
jwilliam Posted October 25, 2008 Share Posted October 25, 2008 You'll have to use Javascript to achieve this. Buttons have a 'disabled' property, so when you initially load the page print your button like so: <input type="button" id="my_button" disabled="disabled" /> Then, write a JS function to toggle the input's disabled property every time a user clicks the checkbox. I won't write out the full script because I'm about to watch a football game, but you can enable the button in javascript with a line of code like this: document.getElementById('my_button').disabled = false; Quote Link to comment Share on other sites More sharing options...
BoltZ Posted October 25, 2008 Author Share Posted October 25, 2008 I know I have to use javascript. That is why I posted in this forum lol. Anyway thx I solved it 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.