• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

depending on the value the required fields should come

 
lalith kumar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am having problem like if i select one value that value related fields should come and if i select another value other fields should be displayed in previous field space only.

pls help me...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34210
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lalith,
You would need to write a Javascript method to do that. What do you have so far?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by lalith kumar:
pls help me...

Please use real words when posting to the forums. Abbreviations such as "pls" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
lalith kumar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jeanne Boyarsky,

I tried that by using javascript. suppose if there are two text fields in our page. Depending on the value it has to display the text field. I am writing that code in javascript only i am hidding the unwanted text field. But problem is with space like in the first text box field place second one has to get replaced.

Thank you
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you show us what you have done so we can see what the problem is by giving us an example test case.

Eric
 
lalith kumar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

suppose if there are three fields like date,venue and reason.These are included in jsp page like




And i have one select box as candidate status



if i select candidate status as attended means it has to display only two fields that is date and venue fields.

If i select candidatus as postponed means it has to display only reason field. This is working fine by using javascript code:



But the problem is when i select candidate status as postponed it will display only the reason but gap is coming because we are hidding date and venue. I want to remove that space and reason should come in date field place. Is it possible.

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic