Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks and arrays -> all in one page

Status
Not open for further replies.

Bramvg

IS-IT--Management
Jan 16, 2001
135
BE
Hi,

I have one page, called index.cfm where I retrieve all the questions from my database for a little quiz, and put them in an arry.

E.g.:
*********
<CFSET question=ArrayNew(1)>

<CFSET question[1]=&quot;First question&quot;>
<CFSET question[2]=&quot;Second question&quot;>

I do the same with my answers, and them I display them in my index.cfm file.

Now, once a user has given an answer on question one and needs to jump to question two, I do not want to switch to a 'new' page. E.g. index.cfm?question=2, because then the user needs to access the server, which is not 'smart'.

Is there a way to display the second question, without having to refresh / call the index.cfm file?

Do I need to do it with javascript or is there a other way of doing it?

Oh yes, I also need to track the answers, if possible ;-)

Tnx!
Bram







 
If you don't want to refresh the page, then yes, you will need to use JavaScript.

You can have CF build the JavaScript arrays for you.

This script builds an image array in JavaScript. Maybe it will give you some ideas?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top