displaying a part of the jsp page based on an item selected from drop down

Hi,

I am developing an application using struts i need to display a part of the form (eg details of the item selected ) depending upon what is selected from a drop down in the form, can you please help me regarding this. iam running short of time , would highly appreciate quick replys

thanx

sameer

[326 byte] By [sam_wiza] at [2007-11-27 11:26:08]
# 1

> Hi,

> I am developing an application using struts i need to

> display a part of the form (eg details of the item

> selected ) depending upon what is selected from a

> drop down in the form, can you please help me

> regarding this. iam running short of time , would

> highly appreciate quick replys

> thanx

> sameer

Do you need to go to the server when the user selects an option?

Manuel Leiria

manuel.leiriaa at 2007-7-29 16:08:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Try this, sorry, I cant elaborate further.

// Show/No Show javascript toggle function

function showData(){

var divx1 = document.getElementById('div_x1');

if (document.userdata.show_data.checked) {

divx1.style.display = "block";

} else {

divx1.style.display = "none";

}

}

<td><input type="checkbox" name="show_data" onClick="showData()">Show data</td>

<div id="div_x1" style="display:none">

//put your html here that you want hidden or displayed

</div>

George123a at 2007-7-29 16:08:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

hi Manuel and george

Thankyou somuch for replying , i wanted the page not to be submitted to server, the solution provided by george is working perfectly fine.

Thanx a ton :)

sam_wiza at 2007-7-29 16:08:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...