Hi,
I am getting an issue when loading the
JSP page content via an AJAX call. What i am doing is loading the same page via AJAX call and the
java script function values are dynamic values taking from the session.
The problem is that it’s not executing the latest java script that comes in the Ajax page content.
Could someone give an idea?
Appreciate a response.
A sample code is given below.
Regards,
Dinusha00
----------------------my JSP page--------------
<html>
<div id="mypage">
<script>
function addmyselection{
/*
sending an ajax call to the same page and taking the content to ajaxpagecontent variable
*/
document.getElementById("mypage").innerHTML=ajaxpagecontent;
}
function updatelatestvalues(){
document.getElementById("amount").value="<%=sessionamount%>"
}
</script>
<input type="hidden" id="amount" name="amount"/>
<input type="button" id="add" name="add" onclick="addmyselection();"/>
/*
Normal body content
*/
<script>
updatelatestvalues();
</script>
</div>
</html>
--------------------------------