File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to hide a particular field

 
shruti patel
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Eclipse IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic