<H2> Would you like to bounce an instance or application?</H2>
<form name="dropDown" method="POST">
<select name="choiceDropDown" onchange="include()">
<option value="1">Instance Level</option>
<option value="2">Application Level</option>
</select>
</form>
<div id="inst" class="outsidePages"><jsp:include page='Instance_List.htm'/></div>
<!-- END CONTAINER -->
</td>
</tr>
</table>
<!-- end content -->
</td> </tr> </table> </div> </div>
<div id="footerWrapper"> <div id="footer">Footer content goes here</div> </div>
</body>
<script type="text/javascript"> function include() { var container = document.getElementById("inst"); container.innerHTML = "";
container.innerHTML = " <jsp:include page='Home.htm'/> ";
}
</script>
</html>
So for the script above what I want to do is if the drop box changes then the div “inst” should change so that it is including a different page. The problem is when I try to do this it breaks. If I make container.innerHTML = "Good morning" or anything else it works fine. Any ideas why this happens?
Without seeing your code sample, I’m going to go out on a limb and say you want to use jQuery, specifically the .load method. It makes stuff like this ridiculously easy.