Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show text onChange but not in a form field

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I would like to show text on a web page with out using a form field. I have seen this done before but I am not sure how. I want to use a drop down to have a user select a value and then right next to that drop down value show pre-definded data. I know can use document.formname.fieldname.value = 'text'; but I do not want to use a text field. I think I need to use the inner function, but not sure how to do so.

I know my post is pretty vague and probably pretty confusing, so let me know if you need further details.

Thanks
Ralph
 
document.getElementById("someElement").innerHTML = "???";

-pete
 
more details...

You want to select from a drop down list. Do you want the field next to the drop down list to change depending on what is selected?
 
What would the &quot;someElement&quot; be, a form element? or a <div></div> or <span></span>.
 
How many could you have tried by the time you posted and i post this and you read it?

Of course not a form element since you specifically asked not to use one right? Should work in both <div> and <span> [wink]

-pete
 
thats what I thought, the &quot;element&quot; is what through me off.

Thanks. I will try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top