View Full Version : AP or AD Tag Problem

01-26-2009, 11:05 AM
I have a external JavaScript file. Within this file i want to put some code which will let me add text into a AP OR AD Tag on the page from which the JavaScript is executed through a button.

Im trying to create a Quiz which after completed, then requires the user to click a button which check the anwers (done this part) but then shows the participants answers (correct and incorrect), with other text in a Div Tag (Layer?)

Unfortunately im confused...the Tag is called "apDiv1".

I do not know how to reffer to the Div Tag from the script, then i dont know what attribute (property) to use to add text( is it .value, .text, etc?)

Your help would be much appreciated

Thank You

01-27-2009, 06:11 PM
You may wish to check out the following program, which has to be one of the easiest ways to create an online quiz:


It may satisfy your needs.

Hope this helps.


01-27-2009, 10:16 PM
Thanks for the link, but i need to learn how to use HTML and Javascript.

nyways i solved the problem:


document.getElementById("apDiv1").innerHTML = "Your answer is: 12"


document.getElementById("element ID here").innerHTML = "your text here"


document.getElementById("") - used to refer to an element
.innerHTML = "" - property to add value to the element