PDA

View Full Version : 10 Part Validation (see for more details)



Rockonmetal
08-23-2007, 06:33 PM
I have a terms of service document in my website, i know like only 1% of people read them so inorder for people to read them i was wondering if it was possible if I could have a link or button or something that when 10 out of 10 of the buttons have been pressed that they reveal a hidden *which is inactive when hidden* button. When all the validation buttons are clicked the form becomes visible and active and is able to send the user to the form... I think that you might have to click all the buttons in order...

I don't think that I've seen this with Javascript, but I think that it could be done using serverscript, but I wanted to ask if anyone here has seen anything like this.

I bet it would be a bunch of if statements like:

If (button clicked, activate button2) else (do nothing)
I know that isn't real javascript and I really don't know javascript that much. Thanks all!

???
08-24-2007, 04:00 AM
You could do add onclick="btnsClicked += 1; checkBtns" to all your buttons, and then add

var btnsClicked = 0;
var checkBtns = function () {
if (btnsClicked == !!!THE NUMBER OF BUTTONS!!!) {
//Do stuff
}
}
and put that in a script element in the head, it should work.

Rockonmetal
08-24-2007, 05:01 PM
how do i get it to show the final button????? i already tried document.write function...

Rockonmetal
08-24-2007, 05:02 PM
Oh, sorry my bad, I got it I messed up with my document write, i put write.document. my bad...