Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
111
rated 0 times [  114] [ 3]  / answers: 1 / hits: 45022  / 12 Years ago, sun, september 9, 2012, 12:00:00

I have two different divisions in a JSP page. One contains a menu of links, when clicked the div2 (id-content) loads different pages accordingly. I am doing something like -



<div id=menu>
<ul class=navbar>
<li><a name=login href=Login.jsp onclick=changeContent()>Login</a>
</li></div>


and in the script I have something as -



<script language=JavaScript>
function changeContent() {
document.getElementById('content').load('Login.jsp');
}
</script>


I also tried -



document.getElementById('content').innerHTML=
<jsp:include page=Login.jsp>;


None of the ways worked. Please suggest how should I


More From » java

 Answers
10

Try jquery..



function changeContent() {
$('#content').load('Login.jsp');
}

[#83175] Friday, September 7, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sidneyh

Total Points: 118
Total Questions: 108
Total Answers: 105

Location: Mali
Member since Fri, Jun 18, 2021
3 Years ago
sidneyh questions
Tue, Jun 7, 22, 00:00, 2 Years ago
Wed, Apr 13, 22, 00:00, 2 Years ago
Wed, Aug 12, 20, 00:00, 4 Years ago
Wed, Jun 3, 20, 00:00, 4 Years ago
Fri, Apr 24, 20, 00:00, 4 Years ago
;