Click to See Complete Forum and Search --> : Variable Interest Checklist and Results
BSquared18
08-19-2003, 07:31 PM
I'm wondering if anyone knows of some available code that will do the following:
There is a checklist of, let's say, ten interests. The user checks off their interests from the list. When they activate the code, they are taken to another page, which page depending on what combination of items they checked off. On that page are items related to the interests they checked off.
This is a toughy, and I don't expect anyone to create it from scratch, but if you know of a similar application that's available to the public.... Well, I know it's a long shot.
Thanks!
Bill B.
Scriptage
08-19-2003, 07:47 PM
it's simple enough:
<script>
//check if a checkbox is checked...lol
if(document.forms['formnamehere'].checked){
do something here;
}
</script>
I'm going to need more info though...
Are there pages for each possible cobination or do you want to dynamically generate the page?
Regards
BSquared18
08-19-2003, 07:56 PM
It would be cool to have dynamically generated pages, but separate pages for each combination would work too. So, let's say the interests are (a) movies, (b) sports, and (c) children's programming. (I used just three as an example, although there would be more in the actual model.) Then, checking (a) would take the user to one page, checking (a) and (b) to another page, (a) and (c) to another page, (b) to another page, and so on.
In some cases, different combinations of checks would take the user to the same page, so we're not talking about one page per possible combination, which would get huge awfully fast.
I just need to know how to point the user to a particular page for each combination of check-offs.
Does that help?
Bill B.
Scriptage
08-19-2003, 08:07 PM
It can be done in javascript but I think you would probably be better of with server side programming.
I will write the code for you.
Regards
Khalid Ali
08-19-2003, 08:07 PM
you can hard code ossible pages and then validate users checked elements and based on that forward or you can pass the checked data to a server side langauge and create the response page based on users choice
Scriptage
08-19-2003, 08:12 PM
thats exactly what we have been discussing khalid.
what he/she wants to know is how to check if a checkbox is checked.
the best way is server side...
either way you want I will program it for you.
regards
BSquared18
08-20-2003, 03:15 AM
Client Side would be preferred.
Thanks!
Bill B.