javascript - Anchor tag is not being recognized when inserted into a dynamically generated cell of a table -


I am trying to insert an anchor tag inside a cell in an HTML table. Below is the code, somehow the tag is not being recognized and I do not get a hyperlink for that cell. What's wrong with this syntax?

  $ ("# tranTbodyId"). Enclosed (' & lt; td & gt; & lt; a href =' pagecontonte.request.contextPath '+ "/ FciDetailDescription.spr">' + key + '& lt; / a & Gt; & lt; / td & gt; & lt; td & gt; '+ value.tradeDate +  

Please provide your suggestions. Thanks. / P>

< P>

You have some incorrect quote characters

  $ ("# tranTbodyId") .append ('& lt ; Tr & gt; & lt; td & gt; & lt; a href = '+ pagecontonte.request.contextpath +' "/FciDetailDescription.spr"> '+ key +' & lt; / a & gt; & lt ; / Td>  

Note: pageContext.request.contextpath To get the value of

  var path = "$ {pageContext.request.contextPath}";  

In that case it will

  $ ("# TranTbodyId"). Enclosed ('<'>  & lt; a href = '+ + path + '/Fcipage.spr>' + key + '& lt; / a & gt; & lt; / td & gt; ...'  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -