automatic redirection.....

A

Andrew

I am setting up a web page to collect some data via a questionnaire.
The questionnaire part is working fine, but I need some help with one
part. I have two different versions of the questionnaire (basically
just different orders of questions) and would like the users to be
redirected to one of the two versions. The idea I had was to have a
redirection page that simply had a web page counter on it (like so many
pages have now days) and based on this counter, people would
automatically be redirected to one of the two versions of my
questionnaire. Basically, if the counter was odd, the person would be
routed to version 1 and if even, they would be routed to version 2. I
thought this would be similar to redirecting people based on the type of
browser they are using or their language settings. However, I was
recently told there is not a way to do what I proposed above. So, this
leaves me with two questions:

1. Was the advice that I received accurate in stating that having a
simple script to redirect the user based on a web page counter is not
possible?

2. If so, does anyone have some advice as to how I could go about
automatically redirecting people to one of two web pages?

Thanks in advance for your time and any help you can provide.
-Andrew
 
L

Lee

Andrew said:
I am setting up a web page to collect some data via a questionnaire.
The questionnaire part is working fine, but I need some help with one
part. I have two different versions of the questionnaire (basically
just different orders of questions) and would like the users to be
redirected to one of the two versions. The idea I had was to have a
redirection page that simply had a web page counter on it (like so many
pages have now days) and based on this counter, people would
automatically be redirected to one of the two versions of my
questionnaire. Basically, if the counter was odd, the person would be
routed to version 1 and if even, they would be routed to version 2. I
thought this would be similar to redirecting people based on the type of
browser they are using or their language settings. However, I was
recently told there is not a way to do what I proposed above. So, this
leaves me with two questions:

1. Was the advice that I received accurate in stating that having a
simple script to redirect the user based on a web page counter is not
possible?

That depends on the nature of the counter you're trying to use.
It's certainly not the simplest way to do what you want.
2. If so, does anyone have some advice as to how I could go about
automatically redirecting people to one of two web pages?

This should best be done on the server, so you don't have to rely
on the visitor having Javascript enabled, but if you must do it in
client-side script, simply redirect randomly.

<script type="text/javascript">
if(Math.round(Math.random())) location="theOtherVersion.html";
</script>
</head>
<body>
<!-- Begin This Version -->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top