SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Simple form check
-
Sep 11, 2003, 06:08 #1
- Join Date
- Jun 2003
- Location
- Germany
- Posts
- 106
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Simple form check
Hi there,
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...
Regards ASchweti
-
Sep 11, 2003, 06:48 #2
- Join Date
- Sep 2002
- Location
- Grand Rapids, MI
- Posts
- 1,168
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hows this? DEMO
From the English nation to a US location.
-
Sep 11, 2003, 07:00 #3
- Join Date
- Jun 2003
- Location
- Germany
- Posts
- 106
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi awestmoreland,
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!!
Regards ASchweti
-
Sep 11, 2003, 07:37 #4
- Join Date
- Sep 2002
- Location
- Grand Rapids, MI
- Posts
- 1,168
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
AndyFrom the English nation to a US location.
-
Sep 11, 2003, 08:58 #5
- Join Date
- Jun 2003
- Location
- Germany
- Posts
- 106
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Andy,
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.
Best regards,
ASchweti
-
Sep 12, 2003, 09:01 #6
- Join Date
- Jun 2003
- Location
- Germany
- Posts
- 106
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Andy,
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,
ASchweti
Bookmarks