I am facing a problem like if I click the button nothing is happening. I looked into the Firebug console. It's throwing an error in the second argument that I have passed.
In the second argument the question is a string, so it is enclosed with single quotes, but the value attained from the server side also has single quotes (father's) so (s middle name?') is not considered by JavaScript and throws a syntax error. How do I avoid this?
Source Code:
JSP page code:
<input type="button" id="btnSubmit" Value="Edit" onclick="return
editSeqQuestion('<%=QuestionId%>','<%=Question%>','<%=QuestionDataType%>',
'<%=AudioPath%>','<%=securityQuestionType%>')" />
In browser, view page source:
The code looks like:
<input type="button" id="btnSubmit" Value="Edit" onclick="return
editSeqQuestion('72','what is your first child's nick name?',
'Alpha Numeric','nickname.wav','SecurityQuestion')" />
Error:
SyntaxError: missing ) after argument list