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

Question regarding changing button Type on JSP  RSS feed

 
tashu Bairy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
" Happy New year"
I have task here. I have some buttons on JSP by default. I also have a pulldown list, where i am going to choose a colour. Depending on the color chosen i need to change all the buttons. Eg, the pulldown has list of colors like red, brown, green etc. when red is chosen from the list, i got to upload "buttonLoginRed" type of button which is declared in .css file. I am trying to use javascript here, but the code is cumbersome as i have 5 differnt type of buttons , all have to changed when the color changes, Is there any way that i can pass this type of color chosen as var to the same JSp 7 depending on that corresponding buttons has to be uploaded. Any help would be really appreicated
thanks
 
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
"tashu db",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
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
Javascript is the only means that you have to manuipulate the client-side state in reaction to client-side events.

The only way that JSP could help you is if you resbmit the page and redraw it on every event.
 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should be a solution for you. It's about dynamically changing the class for the controls using Javascript...

I am troubled by the limitation of not able to use angle brackets when submitting this form....
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!