Question: Using Javascript / AJAX If it is a users first time visiting the page or the cookies (to be discussed) have expired, they are prompted
-
Using Javascript / AJAX
-
If it is a users first time visiting the page or the cookies (to be discussed) have expired, they are prompted for their name.
-
Otherwise, the name stored in the cookie is used.
-
Their name is then sought in a list of important people, important.txt using an AJAX call.
-
If their name is not found, the page adds a message, No greeting for you! and their name is not saved, but
-
if their name is found, the page can animate as follows:
-
They see a panel of 51 labelled buttons for animation speed settings (0 = off, and 1-50 increase in speed) and a panel of 3 buttons for colours red, yellow, and blue.
-
If the cookie was there when the page loaded, their past choice of speed and colour should automatically be selected and the animation (to be described) begins.
-
Otherwise, the form starts off with speed 0 and colour red selected.
-
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
