Click to See Complete Forum and Search --> : Another challenge for Panta wizards...


Jan van Erp
08-14-2003, 04:14 AM
Hi, there.

Following my request, several members of this group have contributed to the creation of a really useful (for me, that is...) Panta script - see thread 'A real challenge for JavaScript magicians'. So maybe I am over-asking a bit here. On the other hand: who can resist an interesting challenge?

This is my request: for something that I am in the process of writing right now - a rather ambitious book-like dynamic structure called PANTACYCLOPEDIA (in short: P) - I would like to have a mechanism that
- keeps track of exactly which pages my reader has already read and which (s)he hasn't seen yet, and
- uses this 'reading history' to either deny or permit this particular reader access to other parts of the book.

See what I mean? I want P to be 'a book with a memory' - the reader reads the book, the book reads the reader (that's about as interactive as one can get!).
The reason for this wish of mine probably is quite obvious to you smart guys (and gals) out there: certain chapters in P are rather difficult to grasp without some prior knowledge that is to be found in other chapters. In other words: in my ideal P, only by reading chapter A, one can earn the right to delve into chapter B - not unlike to what happens in some computer games such as MYST.
I am a 100% JavaScript analphabetic, but I assume that such a system could work on the basis of putting the value of some variables into cookies, all of this assuming that the reader has allowed the use of cookies (or JavaScript, for that matter). Other pages, menu pages for instance, could then use these values to decide which buttons are being shown when the reader opens the menu concerned, and which aren't.

Any suggestions?

DJRobThaMan
08-14-2003, 10:03 AM
hmmm.....


For something like this i definitely think you would need more than just javascript.

using cookies is all good and nice while the user is on your site. However, what if that user is like me and deletes his cookies regularly. Then the next time he entered your site he would have to start over and couldn't just jump to where he/she left off.

So, I think something like this would require a user login (using CGI, ASP, .htaccess, etc..., whichever one you rather). Then after that you would have to keep track of which chapters the user has visited with some kind of database (I'm not really familiar with this aspect of web design but I hear mySQL is really good).

That's what I think makes sense for what you're talking about but, then again, I'm nowhere near the web design genius that I would love to be, so it would be nice to hear if there actually is a way to do this with the sole use of sa javascript without logons and stuff.

Anywayz,
I hope I did help maybe a little bit.


Lata

Jan van Erp
08-14-2003, 11:50 AM
Thank you, Lata. The fog is beginning to get a little less dense now...

emmanuellamy
08-14-2003, 11:20 PM
Another practical approach would be to create a Log-In database with a field to identify the "last page" read by your reader. Such a field should be dynamically updated everytime a reader accesses a new page. From there you can code in some condition for a reader to access a page.

I think your project is doable.

HTH

Jan van Erp
08-15-2003, 02:15 AM
Originally posted by emmanuellamy
... I think your project is doable.
HTH

For a real programmer, that is...