PDA

View Full Version : Change page property of <jsp:include>


josephtan2k
06-24-2009, 03:01 AM
Hi..

I have this problem..
I have jsp page which contains a select tag and a div..
<div id="detailsBody">
<jsp:include page="investigation-types/vehicular-accident.jsp">
</jsp:include>
</div>

when the select onchange event happens what I wish to do is change the page property of the <jsp:include> to another jsp page without reloading the whole page..just the div..the jsp pages that would replace also contains javascript (in script tags)..which needs to be executed after changing the page property..

using innerHTML does not work..I dont know if its possible in javascript though, if not how should I go about this?

How about AJAX?Is there a solution using this technology?

Have been searching around the net but still havent found a solution..
Any help would be greatly appreciated..
I hope someone can shed light on this problem..

Thanks in advance..

Jimbooo
06-27-2009, 05:26 PM
You could use Ajax to replace a certain DIV. Ajax calls can be done using Javascript. The response of such a request must only contain the part of HTML that you want to replace the current HTML with. Then you will have to use javascript again to replace the HTML.

The most easy way would be to completely refresh the page with a certain request parameter.The use ${param.yourparam} to decide which JSP you want to include.