View Full Version : html button help needed?
05-08-2006, 09:29 PM
hi, i want to have a button that says next and will only work if the checked box on top of it is checked. Does anyone know how to do this?
05-08-2006, 09:33 PM
in the function that the next button calls, you can just check if the checkbox is checked:
<input type="button" onclick="func();" />
05-08-2006, 09:43 PM
doesnt really make sense is this the whole code? or do you want me to right things in it?
05-08-2006, 10:24 PM
Ok, an example of it would be like the agree form we use here to register.
05-08-2006, 10:40 PM
well, what does the button do?
A button that says next doesn't actually do anything when you click it. You have to tell it what to do.
So yes, you need to fill things in.
05-08-2006, 10:58 PM
im am goign to list all my rules then, when you check in the box that you agree then you click a button called next which will take you to a different page. If you dont check the box and when you try to click next it i dont want it to work.
05-08-2006, 11:02 PM
so where I have doWhatever, you put the code that the button is supposed to execute.
05-08-2006, 11:44 PM
could you give me an example of the button code?
05-09-2006, 04:41 AM
I mean, I don't know what you want to do. Submit a form? Calculate the total cost of the order form? Send an ajax call to validate their data? Do you see my dilemma? I have NO idea what you want beyond "the button not working unless the checkbox is checked". I got that for you, now you gotta make it work when the checkbox IS checked.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.