Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to insert a bean:write value that has a space

 
raghu yeggina
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends..

Unable to insert a bean:write value, that has a space, as an argument for a javascript function.

to be more clear...

<a onclick=displaySpecificationValue('<bean:write name='destinationsObj' property='titleId'

/>','<bean:write name='destinationsObj' property='titleName' />') href="#">


in the above code the titleName property returns a value New Zealand that contains a Space and

because of a space in between the literals the on click function is not getting called at all

but its working fine with the values that don't have any space in between

and finally..

this is my first post in our portal and please forgive if any conventions not followed and give me your valuable suggestions..
 
raghu yeggina
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends.


i resolved the flaw in the logic which is a very small one


it was onclick=displaySpecificationValue(..) earlier

where double quote is missing before the method call

i changed it to onclick="displaySpecificationValue and now its working fine..

thank you for the visit...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic