abstract:
<div id="responseQues">
</div>
Here's the javascript
Code:
function displayQuestion(index, tabindex){
document.getElementById("responseQues").innerhtml = "this is a test";
}
What am I doing wrong?
Thanks
I have a select option drop down menu and I'm using onChange in order to write text in a div. But, when I test the drop down nothing is happening.
Here is the code
Code:- <select name="selectedquestion" onclick="displayQuestion(this.selectedIndex,3);">
- <option value="R_4">What was your childhood nickname?</option>
- <option value="R_5">In what city did you meet your significant other?</option>
- <option value="R_6">What is the name of your favorite childhood friend?</option>
- </select>
- <div id="responseQues">
- </div>
Copy Code Here's the javascript
Code:- function displayQuestion(index, tabindex){
- document.getElementById("responseQues").innerhtml = "this is a test";
- }
Copy Code What am I doing wrong?
Thanks |