...

View Full Version : Creating this?



Have1abanana
08-06-2002, 10:40 PM
Hi everyone!
I saw this site with this on and I was wondering how I could do the same thing, with my own quizzes, ie, how to gather the input and make it go to the specified link, etc.
I cant really explain it so here's the link:

http://www.relentlessdivas.net/disneyquiz.html

And basically, how?!

What's the process for making one of these?

I really appreciate the help


:D

Thanks! :thumbsup:

beetle
08-06-2002, 10:56 PM
If you view the source on that page it's pretty much all there.

They define 4 variables (snowwhite, ariel, cinderella, belle) and increment these each by one for each answer that pertains to that subject. Then the variable with the highest number(score) is used to redirect the user to the appropriate HTML page.

Have1abanana
08-06-2002, 11:01 PM
:D Thanks!

I'm probably being dense again, but how do you direct to the appropriate page?

snakedevil1
08-06-2002, 11:03 PM
if something equals something, window.location.replace('urlgoeshere');

beetle
08-06-2002, 11:04 PM
Well, here's the code from that page that does it...
var out = "cinderella";
i = cinderella;
if (snowwhite> i) { out = "snowwhite"; i = snowwhite; }
if (ariel> i) { out = "ariel"; i = ariel; }
if (cinderella> i) { out = "cinderella"; i = cinderella; }
if (belle> i) { out = "belle"; i = belle; }
location.href = out + ".html";

Have1abanana
08-06-2002, 11:08 PM
Thanks for helping a Javascript thicky :)

I think I've grasped the concept :D


:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum