• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to hide a particular field

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In my application, i have two drop down buttons, when i select one all fields are displayed,that's fine. but when i select the other drop down button only few fields should display. how can i hide the remaining fields..
and even how to reload the page when i select the other drop down.

ALL these changes should be made in struts JSP.
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..

Can you please make your question clear.

As per my understanding you have to use Show and hide div for this.

you have to use Ajax for data updation on select. Web part is easy to use for AJAX.

Thanks,
Nishan Patel
 
shruti patel
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

here is more clear about my application

two drop down 1) request order
2) default order

when i select request order few fields are displaying like
1) representatives to create orders of this type
2) products to be added to orders
3)procedure to be selected

and when i select default order few fields should not display
1) representatives to create orders of this type
2) products to be added to orders

should not display the third field..

so how can i do this using JavaScript. please give me sample code .
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...

If on select drop down
1) request order
2) default order

your contains are static then directly you can put it into div and hide div and at the time of page load hide that div and no need to use ajax.

onselect drop down you can change status through javascript div hide to show div.

if your contains are dynamic then make database with
1) representatives to create orders of this type
2) products to be added to orders
3)procedure to be selected

AND

1) representatives to create orders of this type
2) products to be added to orders

with its parent id.

then call ajax onchange select box and display it.
Use "Web part Ajax" for it.

Now i dont have code for this.
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic