|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there everybody,
I need help quickly, Because this is for my final year project. This is the problem that I have got: I have a combo box written in JSP and I want a table to be displayed below the combo box when a user clicks on an item in the list. Please can somebody send a code example for me to try as it is getting desparate now, Many Thanks, Maytrix (on the edge) |
|
#2
|
|||
|
|||
|
Are you saying you want a user to pick a selection out of a drop down and then have the table show without resubmitting the page?
If so, then this is a javascript/html question. You can use the cascading style display. Give the table an id and then you can manipulate the style of this table in javascript. Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script>
function changeDisplay(displayTable) {
var value = (displayTable ? "block" : "none");
var t = document.getElementById("table1");
t.style.display = value;
}
</script>
</head>
<body>
<select onchange="changeDisplay(true);">
<option></option>
<option>something</option>
</select>
<table id=table1 style="display:none">
<tr>
<td>
Some stuff
</td>
</tr>
</table>
</body>
</html>
For more details you may want to check in the javascript/html forum. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > JSP Combo boxes and tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|