javascript; is this doable?

Joined
12 Feb 2006
Posts
17,509
Location
Surrey
doing javascript coursewsork and brainstorming some ideas rightnow.

the course work bascially is someone comes to the website, reads a tutorial, takes a test and gets results.

whati was thinking was maybe have it so the user puts in there name and age just before taking a test which would get stored, (possibly in an array if thats the best javascript way to do it other then using a database and php?), then when if you visit the homepage there is a search box which will allows the user to search for previous users and see what score they got, this would use ajax to get the information as they type, like they start typing adam, they type a, gives adam, aaron, adrian etc, then ad, gets adam, they click the name and up pops a table of full name, age, score, length it took to take test etc.

so before i go ahead and start it is this doable with javascript? any reccomendations of better ways to go about doing it using javascript?

thanks
 
you'll still need php (or other server side language) and a db for stateful data. Javascript, and yes even that fabled buzzword "AJAX" cannot, and will not, all out replace the back-end of an interactive or dynamic website.
 
so i coudln't store the information in like a text file and get ajax to do some wonderful stuff and get the required information?

i have only given ajax a quick read so far so sorry if im asking the impossible
 
so i coudln't store the information in like a text file and get ajax to do some wonderful stuff and get the required information?

i have only given ajax a quick read so far so sorry if im asking the impossible

Javascript is client-side, so even if you could write to a text file (which you can't with js) it would still only be on the machine running the browser.

You need a server-side script to store info (textfile, xml, db or whatever) on the server, which can then be accessed from any machine with a browser.
 
Javascript is client-side, so even if you could write to a text file (which you can't with js) it would still only be on the machine running the browser.

You need a server-side script to store info (textfile, xml, db or whatever) on the server, which can then be accessed from any machine with a browser.

ah course it is, my bad.

ok well check this space in a couple of days for the problems i will come across when trying to do it.
thanks guys
 
Back
Top Bottom