...

View Full Version : Javascript Questionnaire



emma896
11-06-2004, 08:59 PM
Hi, I need to make a Javascript questionnaire because of a market research project that im running.

E.G...I need it to be something like:

======================

Q1: What is your favourite colour?

A. Blue
B. Red
C. Yellow

Q2: What is your favourite food?

A. Pizza
B. Kebab
C. Chips
D. Other (if other please specify below)

Submit Questionnaire

====================

Then if possible after they submit their answers can I sort of have it show up as a poll?

Do u know of any scripts?

Any help much appreciated!!!!! :thumbsup:

Emma!

fci
11-06-2004, 09:19 PM
This should be done server-side. JavaScript could do the validation but so could the server-side.
PHP would probably let you do it easily.
Here are some free(mostly) scripts you can take a look at:
http://www.hotscripts.com/PHP/Scripts_and_Programs/Polls_and_Voting/

emma896
11-08-2004, 09:56 AM
Thanks for the site but after I can really find what i'm looking for.

I though maybe that I could have it where people answers questions and then it would show up on a %scale system...etc.

Thanks for your help anyway! :thumbsup:

jbot
11-08-2004, 10:08 AM
I though maybe that I could have it where people answers questions and then it would show up on a %scale system.

you won't be able to use JS for this, i'm afraid, since it won't be able to garner everyone else's answers. you have to post the info to a server app (PHP, ASP, JSP, whatever your host or server supports/has installed really), and then re-display the results after submission.

as FCI pointed out, you can use JS to do some validation. but you'll still need to do it serverside, too, just in case JS has been disabled.

btw: my brither and family are in Rhos-on-Sea. say hylo if you can LOL

emma896
11-08-2004, 10:32 AM
Oh right....thanks....didn't know that...

Bore da to you aswell!

Rhoss on sea.....I take my dogs out on that beach....lol

Got any ideas how I go about making one via PHP or whatever it is?

Sorry...im ok with a bit of javascript then im lost! ;)

Thanks Anyway!

Emma.

jbot
11-08-2004, 10:47 AM
Got any ideas how I go about making one via PHP or whatever it is?

first of all, you need to find out if your host's server has PHP installed, and if not what kind of serverside programming is allowed. there's not much point proceeding if they don't.

now, if they do, you maybe want to take some time to get to know the basics of the language (it's more complicated, tho not necessarily more difficult than) JS.

once, you've done that, go back to the website FCI sent you to, and use one of the scripts uploaded to it: you'd prolly be best going for the one labelled "Easy PHP Poll" or else the one immediately below. otherwise, find a PHP forum (either on this site) or www.phpbuilder.com and ask for some help.

emma896
11-08-2004, 10:59 AM
Thanks for the site...That should help me what I need to do.

I haven't paid for the website hosting yet....am just getting it designed now.

So I need to make sure that they have PHP for hosting..

Thanks for that tip.... :thumbsup:

jbot
11-08-2004, 11:05 AM
So I need to make sure that they have PHP for hosting.

yes, you do.

however, most paid hosting sites have PHP installed. i use Supanames. Plug Socket is also highly recommended. these two are relatively inexpensive and offer different rates to suit different budgets.

i'm sure you'll have no problems with PHP. it's kinda from the same family of languages as JS and so you should feel quite familiar with some of its syntax and style. good luck :)

emma896
11-08-2004, 11:41 AM
yes, you do.

however, most paid hosting sites have PHP installed. i use Supanames. Plug Socket is also highly recommended. these two are relatively inexpensive and offer different rates to suit different budgets.

i'm sure you'll have no problems with PHP. it's kinda from the same family of languages as JS and so you should feel quite familiar with some of its syntax and style. good luck :)

Thanks! You've been a helpfull! :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:

I learn new things everyday on the web....lol ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum