Here is my code:
<html:text name="rptData" property="emailAddress" onblur="checkIfEmpty('<bean:write name="rptData" property="status" />' , this.id)" />
This is nested inside a logic:iterate tag. What i need to do, is to pass value of ‘status’ to the javascript checkIfEmpty method. But i guess there is some error in the quotes. It is not working properly. Please anyone guide me. Thanks.
ok after doing some research i found out the answer.
if i have some code like this:
its output is as follows:
but if i use
the output is:
That means without string concatenation the output is correct. i.e. only using
rather then
or even
yeilds correct output.
So the workaround is to first intialize a complete java String in a scriplet then use it inside the styleId tag.
It will work fine. Cheers !