Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Enable Command Button on entering all values in mandatory fields  RSS feed

 
trupti gore
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.Next Button should be enabled only when all required fields have been selected or filled.

Can any one help me out with this,
I have written javascript on onchange of textfields, but now i have too many mandatory fields, how it can be done using "Rendered" attribute and also disabled="true" is creating problem as not passing the value to next page.

Thanks in adv
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, you need javascript.

The rendered attribute is applied when the page reloads and is redrawn by the server, so you'd actually have to make a server request (which is what the commmand button does anyway).

When set by the server, I've had problems with the disabled attribute. On one program, I could re-enable the control with client-side javascript, but since the page had been rendered with a disabled control, it didn't have the extra support that a fully-enabled control would have, even though I had enabled the HTML control itself.
 
trupti gore
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim

The Same has been done using Javascript
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!