I hace the following code-Snippelets
- I have an &-character in a HTML(PHP)-form [see Graphics]
I send this data to a Javascropt-file by a button
<button onclick="sendEntry()" > Senden </button>
sendEntry is defined as follows:
....
if(document.getElementById("Eintrag").value==""){
ERROR= ERROR + "Kein Eintrag eingegeben\n";
}
else{
**PARAMS=PARAMS** + "&Eintrag=" + document.getElementById("Eintrag").value;
}
...
the result is sent to a Ajax-request:
ajaxRequest.open("POST", "./../php/MakeEntry.php", true);
ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
ajaxRequest.send(PARAMS);
....
How can I avoid that the &-char auses a new POST-Parameter as shown in the Graphics ??