depends how you call them.
personally, i would create an iterative function in the <head> of the document which opens the prompts and validates the answer given. You could then call this function with an even handler in the <body> (eg - clicking on a link starts the prompts opening, or just...