delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
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:
  1.         <select name="selectedquestion" onclick="displayQuestion(this.selectedIndex,3);">
  2.          <option value="R_4">What was your childhood nickname?</option>
  3.          <option value="R_5">In what city did you meet your significant other?</option>
  4.          <option value="R_6">What is the name of your favorite childhood friend?</option>
  5.         </select>
  6.                     <div id="responseQues">
  7.                     </div>
Copy Code
Here's the javascript
Code:
  1. function displayQuestion(index, tabindex){
  2.         document.getElementById("responseQues").innerhtml = "this is a test";
  3. }
Copy Code
What am I doing wrong?
Thanks

TOP

That was a typo I meant to use onChange
But I did get it working. It starting working when I put test content in the div before I changed the text to modify it.
Thanks

TOP

TOP

Sorry, but that was a different question in that post.



                    <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

TOP

Back Forum