1. Home
  2. Computing & Technology
  3. JavaScript

Amending Quizes
Changing Questions/Answers/Destination Pages

By Stephen Chapman, About.com

The exact wording of questions, answers, and destination pages (for those quizes that use them) all appear in the quiz entries in plain text.

If you wish to edit the wording of a question or answer (or change a destination page) then you can simply edit the entry within the script itself to make your changes directly. There are just a couple of things to watch for though when you do this.

  1. You can't change which answer is correct if you change the answers. The information as to which is the correct answer is concealed within the two numbers at the start of each entry.
  2. Any apostrophes within the question or answers needs to be "escaped" by placing a backslash in front of it (\'). Otherwise it will be interpreted as the end of the text and will stop the script working.
  3. You can't include tilde characters (~) in your questions or answers as this character is used by the script as a separator between the parts of an entry.
  4. If you want to display a <, >, or & in a question or answer then you need to code it as <, >, or & respectively so that it is not misinterpreted as HTML.
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Script Makers
  5. Quiz Scripts
  6. Changing Questions/Answers/Destination Pages>

©2009 About.com, a part of The New York Times Company.

All rights reserved.