Yesterday we got to a point with a web project we were working on called the “Job Search Grid Game” (and thanks here to Science Puzzles for Young Einsteins by Helene Hovanec ISBN 0-8069-3542-1 for the inspiration) and we ended up with a game that could use Content Management System ideas whereby the user could control the content of the game. Guess you might categorize this functionality as “personalization”.
That “personalization” only lasted as long as that web browser session lasted, and there was no recourse to recall any of that user “personalized” game data settings again, but today we’ve started, by using this project as the “guinea pig” project to start down the road of seeing whether the use of HTTP cookies might assist to extend functionality for …
- only users who tailor their game via that “Management” link down the bottom of the game … and who …
- use this new live run link (rather than the old live run link) … because there are checks to see that …
- functionality occurs if the calling HTML has code such as <div id=dcookies_okay><input type=hidden id=cookies_okay value=”></input></div>
We’ve tried thoughts that are quite “generic” by nature here, but we have to better monitor web browser cookie usage limits, as we go further down the road, but we …
- in a web browser address bar URL such as http://www.rjmprogramming.com.au/HTMLCSS/job_search_grid_game.htm that bold part is combined with a reworked date and timestamp to be the “name” of the cookie … and only if …
- the web browser address bar URL must contain a “&” to attract any attention as a candidate for the creation of a new cookie … which, if never encountered before …
- placed on a dropdown “cookie” list of game configurations that indicate the date and timestamp for reference purposes … and, as for all web browser scenarios …
- cookie logic only works while the user has not cleared the Browser History at their web browser
… and that HTML (select element) dropdown is placed, in “overlay” style …
- position:absolute; top:0px ; left: 300px;
- opacity: 0.7;
- zIndex: 56;
- method=GET
- action=./job_search_grid_game.html
… the Javascript logic for which has been placed into some external Javascript you could call cookie_get.js that we are going to place at http://www.rjmprogramming.com.au/ (document root) for maximal access purposes, and which is called by the job_search_grid_game.htm via …
<script type='text/javascript' src='../../../../cookie_get.js'></script>
… which is like saying any webpage out from document root to four subfolder hierarchy could all access this external Javascript with the same codeline between <head> and </head> as above, and that external Javascript uses a setTimeout function call to separate its logic from any clashes with document.body onload event logic, or any jQuery document ready logic.
Now the HTML and Javascript could be called job_search_grid_game.htm and changed from yesterday for HTTP Cookie functionality in this way.
We hope you get something out of these “early days” HTTP Cookie thoughts, that we may apply to some of our game web applications.
Previous relevant Job Search Grid Game Tutorial is shown below.
We are always on the lookout for a good quiz or game. But what if that idea is “sort of” … both? Well, we just had to give the dog a bone! But we digress.
This is where we have to thank Science Puzzles for Young Einsteins by Helene Hovanec ISBN 0-8069-3542-1 profusely. This book is full of wonderful brain games that combine puzzle feels with game feel and quiz feel. We normally like to shape a game based on another we stumble across, and add our own content, but, alas, the content here for today’s game is so good, it makes my brain hurt thinking of another set to make it work. And that is where we “value add”. Not with the “default content” of the game, but to value add to the experience we CMS it. So what does “CMS it” mean? Well, “CMS” stands for “Content Management System”, and we use the principles of CMS to encapsulate all the variable aspects we can think of about this game … within reason and present that in an HTML form …
… our usual “suspects” for such goings on. So should the information not be too long, this should allow the user to set their own content for the game … all you young and old Einsteins out there.
However, if you find today’s game interesting and/or stimulating, rest assured Helene Hovanec has filled a book full of puzzles and quizzes and challenges like this, and so we would recommend you get out there and buy Science Puzzles for Young Einsteins by Helene Hovanec ISBN 0-8069-3542-1.
Within the HTML and Javascript job_search_grid_game.html code you will find lots of calls to Javascript’s eval method to get a CMS job done, but not involve a serverside language … does not compute … whatttevvvvvvvver.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.