I’m trying to replace a dashed line with an answer after a “click here†prompt. Here’s an example: 1) Find the principal parts of the verb “drive†by filling in the blanks below. Click here to check your answer. I _____ now. (Present tense) I _____ in the past ( past tense) I have ______ every day. (Past participle) After “Click here†is clicked, the above will be changed to: I drive now. (Present tense) I drove in the past ( past tense) I have driven every day. (Past participle) Is there a way to do this with javascript/scriptaculous? I’m building an instuctional site on English grammar. I’d appreciate some help. Thanks, Mike
Hi, If you give your input elements id values, you can then use document.getElementById('idvalue').value = 'newvalue'; from an onClick function attached to your button. Hope this helps