I have an onclick for a image like this.
onClick=”expands(‘ name + ‘, ‘ value ‘). the name variable has a single quote in this. Say name=Mat’hew. Then onclik is not able to call this method.
I escaped this using ASCII
name=Mat(ASCII VALUE OF QUOTE)hew
Then also same is the case.
Is there a method to escape a single quote in Java Script function call
[SIZE=”1″][I]The following statment is for JSP people.
Infact i am writing this image using JSP only.Actual syntax I use is this
document.write(“<img src=””+hello + “/images/hello.gif” id=”img_” + name + “” onClick=”expands(‘” + name + “‘, ‘” + value + “‘)” name=”” + levelImage + “”>”);