Poll is a simple poll you can add to you website with two lines of html code and one XML file.
You need to add the following line of code between the head tags in your html file you
want the poll to be on (this line of code tells the web browser where to look for the
file needed to run the program):
<script type="text/javascript"
src="http://www.uwplatt.edu/template_data/polling/poll.js"></script>
You then need to add the following line of code in the area you want the poll to appear
(this line of code calls the function needed to setup and run your pole):
<script type="text/javascript">
makePoll('PLACE THE NAME OF YOUR XML FILE HERE');</script>
When you put your filename in the above line of code you must put the full path.
For example:http://www.uwplatt.edu/web/poll.xml
You must also make sure to leave the quotes around the file name.
The xml file is the file that contains your question along with the choices for response.
If you want more than one poll in the same folder, each
file must have a different name. The xml file must be placed in the same folder as that of the
html file associated with it. If you want more than one page to have the same poll on it, all
html files and the xml file must be in the exact same folder. The XML filename must
end with .xml the rest of the name is up to you just no . or /
The xml file must have the following format, you can simply copy and paste the following into your file and change the values. Do not change anything that is not bold except for removing the ... You can have as many choices as you want simply put more of the option blocks in.
<?xml version='1.0'?>
<!DOCTYPE poll SYSTEM
'http://www.uwplatt.edu/template_data/polling/poll.dtd'>
<poll>
<question>PLACE YOUR QUESTION HERE</question>
<option>
<value>PLACE YOUR FIRST CHOICE HERE</value>
<votes>0</votes>
</option>
<option>
<value>PLACE YOUR SECOND CHOICE HERE</value>
<votes>0</votes>
</option>
...
</poll>
Top