Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

having a character " ' " in the url of a href in jsp

 
Harish Muthuraman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<a href="#" onClick="javascript:actionClick('voirDetailsJour.do?usineSelect='+ document.forms[0].usineSelect.value+'¯ozecSelect=1&autreMacroZecValue=<bean:write name="SYN" property="labelSyn"/>');"></a>
suring runtime <bean:write name="SYN" property="labelSyn"/> value becomes "STN'STB".
when ever the value contains an appostrophe, my link does not work.
please help

 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem is not ' but ". your link is malformed

<bean:write name="SYN"

The first " marks the end of " in onClick="javascript:actionClick

see if the link given below works for you.

<a href="#" onClick="javascript:actionClick(\'voirDetailsJour.do?usineSelect=\'+ document.forms[0].usineSelect.value+\'¯ozecSelect=1&autreMacroZecValue=<bean:write name=\"SYN\" property=\"labelSyn\"/>\');"></a>
 
zohaib shiekh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bean tag in using with java script will not work but some time worked
your are through is value using request and get get on page
thanks
 
Harish Muthuraman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Sunny Bhandari
Thanks for your reply.
But again same link works when the bean write's value doesnot have an appostrophe in it. So, i don't think the double quote is the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic