aspose file tools*
The moose likes Struts and the fly likes having a character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "having a character " Watch "having a character " New topic
Author

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

Harish Muthuraman
Greenhorn

Joined: Jun 10, 2010
Posts: 11
<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


With Regards
Harish M
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

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>


Java Experience
zohaib shiekh
Greenhorn

Joined: Apr 03, 2011
Posts: 4
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

Joined: Jun 10, 2010
Posts: 11
@ 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: having a character " ' " in the url of a href in jsp
 
Similar Threads
Iterate Hashmap through struts
function of Javascript in Struts is not working
Java Script not working in firefox but working in IE
usage of <html:link> tag
help :how to get value from logic:iterate