i created a button that will be created dynamically, so the html content of the button is written on javascript string. this is my code:
<tr>
<td><input type='button' value='Apply Now'
onclick='pageRedirect('" + entity.ServiceID + "', '" +
entity.RecordID + "');'>
</td>
</tr>
this code does not work, particularly on the part where i assigned the parameter. i also tried this code with escape sequence but still the same error.
<tr>
<td>
<input type='button' value='Apply Now'
onclick='pageRedirect(\'" + entity.ServiceID +"\', \'" +
entity.RecordID + "\');'>
</td>
</tr>
I don't know what I'm missing. Some help please?
onclick = 'pageRedirect('" + entity.ServiceID +"', '" + entity.RecordID + "');'AssumingpageRedirectandentityare global symbols, I'm not sure why you don't just useonclick='pageRedirect(entity.ServiceID,entity.RecordID);'