Simple form check
I would like to do a simple check if a radio box has been selected.
The form doesn't select any radio box by default, because I don't want to influence the users choice or let them submit the box at all without doing anything.
The form is a simple 5 star rating which means there are 5 radio boxes and a submi button.
Thanks for some help on this...
exactly what I was looking for. I just thought there would be an easier way to check instead of using a for() statement.
Well, it works and I will use it ;)
Thanks for your help!!
Glad it worked. I continued playing around and cameup with this too: Demo #2
In this case, I've removed the submit button as it updates automatically when the selection is changed.
It looks nice, but it may be totally useless ;)
you are right, this is really nice but in my case useless. I am programming a 5 star rating tool, so I count of course all votings and return an average ;)
Thanks anyway, especially because I was not aware that you made this example just to help me out.
may I ask you one more question regarding your script? I've come to the stage where I want to add my rating script into an actual page. I now face the problem that there are multiple items on one page which can be rated.
Therefore the form check needs to handle multiple forms on the same page. I see two ways. First, name every form differently and having multiple scripts for checking.
The second, which I prefer, would be to work somehow with an array and have just a single script, but I am not sure how to do that with JS.
Do you have an ideas?
Thanks very much,