Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Name and ID inside loop  RSS feed

 
Joe Brigs
Ranch Hand
Posts: 70
IBM DB2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Array thats populated from a Database, can be 1 to many occurrences. I want to use it to populate a dropdown box , it wil be the "Selected" value thats seen on the screen, but its an update screen so user can change from 3 other options. How do I set the name and id to be diffrent for each occurrence, so I can use name in servlet to do DB update. The last code I tried ==> name="'upsLoc1'+j" obviously didn't work. I'm sure its simple , but I'm blind. Thanks for help

 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used scriptlets for years, but if your organization is still mired in the past and is stuck using them, wouldn't that just be
 
Joe Brigs
Ranch Hand
Posts: 70
IBM DB2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul, Thanks that was correct very obvious I should have known that. And yes were still using scriplets. I started using JSTL tags but my mentor prefers scriplets and this is my 1st Java Project. Thanks again
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Brigs wrote:but my mentor prefers scriplets


Does he also prefer stone knives and bear skins? He's mired 10 years in the past. Be aware of this and don't let it deter your own advancement.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!