This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to fectch the selected index number from dropdown list?  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have fetched 2nd and 3rd columns from database in view in the list.




Now I want to store the selected index number in a database table.. How will i Get the selected Index Number???
 
author & internet detective
Sheriff
Posts: 38561
654
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to include a value attribute in your options. That way, when the form gets submitted, you have something there.

Also, note that it is poor practice to put Java code in the HTML. Especially database code.
 
Mayukh Singha Roy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:You want to include a value attribute in your options. That way, when the form gets submitted, you have something there.

Also, note that it is poor practice to put Java code in the HTML. Especially database code.



I know, I wrote like this so that the people seeing it can understand it better.. If help me with the solution i will be happier..
 
Author and ninkuma
Marshal
Posts: 66799
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:
Also, note that it is poor practice to put Java code in the HTML. Especially database code.


Mayukh Singha Roy wrote:I know, I wrote like this so that the people seeing it can understand it better..


It'd be best not to do that. Showing us the code in its real setting avoids side-tracks such as this.

Mayukh Singha Roy wrote: If help me with the solution i will be happier



Jeanne already gave you the solution:

Jeanne Boyarsky wrote:You want to include a value attribute in your options. That way, when the form gets submitted, you have something there.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!