I have a form that on submit is doing an update/insert to a database via ajax. When it is an insert and it is successful I append a row to a table with the elements they entered (they are not sent back from the server, just a success, error result is returned).
Maybe I have to send them back in the response to properly do this? I dont know. Is there any function in javascript/jquery to convert characters such as "<" and ">" to their html code equivalents or must I write a function to do this myself(I know this is possible just looking for a better route). Basically I need a javascript equivalent of "htmlspecialchars($string)" in PHP. Any help or suggestions would be greatly appreciated. Thanks!