It may be a silly question but I really stuck there for long time. Hope someone can give a hand and explain the root cause here. Thanks.
In my processing JSP, I have following code to call a Javascript function. All values are got from front-end JSP through POST action:
<a onclick="loadPredecessorPage(${param.predecessorName})" href="javascript:;">
${param.predecessorTitle}
</a>
At the same time, in its above header, I have this following javascript function:
<script language="javascript">
function loadPredecessorPage(predecessorName)
{
var url = predecessorName +".jsp";
document.location.href = url;
}
</script>
I have used firebug to observe the values. They were correct in the sense of values. Actually, the predecessorName variable is just the name of model class in my own MVC design. If the program was working, the user should be able to click the link and access corresponding front-end view JSP of the specific model class.
Can someone point out the faults I made in above code?