I am trying to w3 validate my code and run into a problem with my url value using POST. The obvious problem is the & but I am having trouble replacing it and the code still work.
This is working
var string = 'delete_id='+ delete_id+"&owner_id="+owner_id;
This is what I thought would work.
var string = 'delete_id='+ delete_id+"&owner_id="+owner_id;
If that code appears in a
<script>element in an HTML document, then the first example should work.If the document is an XHTML document, then the second version should work, but only if the document is served as
application/xhtml+xml.If you are writing XHTML but telling the browser that it is HTML then your options are:
For further reading, see the HTML compatibility guidelines for XHTML.