aspose file tools*
The moose likes Struts and the fly likes How to hide a particular field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to hide a particular field" Watch "How to hide a particular field" New topic
Author

How to hide a particular field

shruti patel
Ranch Hand

Joined: Mar 10, 2008
Posts: 52
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

Joined: Sep 07, 2008
Posts: 689

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


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
shruti patel
Ranch Hand

Joined: Mar 10, 2008
Posts: 52
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

Joined: Sep 07, 2008
Posts: 689

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
 
subject: How to hide a particular field