title: Dynamically assign the redirection href in JSP by using Javascript
body: <p>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. </p>
  
  <p>In my processing JSP, I have following code to call a Javascript function. All values are got from front-end JSP through POST action:</p>
  
  <pre><code>&lt;a onclick="loadPredecessorPage(${param.predecessorName})" href="javascript:;"&gt;
     ${param.predecessorTitle}
  &lt;/a&gt;
  </code></pre>
  
  <p>At the same time, in its above header, I have this following javascript function:</p>
  
  <pre><code>&lt;script language="javascript"&gt;
        function loadPredecessorPage(predecessorName)
        {
             var url = predecessorName +".jsp";
             document.location.href = url;
        }
  &lt;/script&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>Can someone point out the faults I made in above code?</p>