Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting the value of the select box in a textbox

 
Mary Wallace
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when the user select a value from select box i need to display that in a textbox. But somehow or another the code i wrote is not working




SELECT Name="TWENTY_MONTH_DIS" onchange="xpopulate(this);"
[ October 04, 2004: Message edited by: Mary Wallace ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the names are wrong!
 
Mary Wallace
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my actual code its correct. When I pasted the code , i pasted name of anotehr text box
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran the code with the correct name of the select and text box and it ran.

The select name is different for the example and the script that you posted.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the code that I ran:



Is that what you are doing?

Eric
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mary,

I have a code to get the selected value to the text box in the form.

And the code is as follows :



Is this what you were looking for? Kindly acknowledge

Cheers,
Swamy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic