Updating the DOM with a JSTL import?
I want to update the content of my page dynamically and I understand how to use javascript and the DOM to access and and change the content that way. My question is can I change the DOM by using a JSTL import statement to specify the content?
something like:
<html>
<script>
functionAlpha(){
document.getElementById('content').innerHTML = <c:import url=\"alpha.jsp\" />
}
functionBeta(){
document.getElementById('content').innerHTML = <c:import url=\"beta.jsp\" />
}
</script>
<body>
<!-- not the best practice here but will workforthis example -->
<a href="javascript:contentAlpha()">Alpah</a>
<a href="javascript:contentBeta()">Beta</a>
<div id="content">
</div>
</body>
</html>
I have tried the crux of the above and it does not work for me. Please let me know if this should work and i have the syntax wrong or if there are alternative methods to achieve what i am trying to accomplish. any help is appreciated. thanks.

