I have an HTML form containing different input fields (most of them are text values) but as soon as an extra character is filled (% for instance) I'm not able to retrieve it.
here is the HTML form:
<form id="myform" class="form-horizontal" action="javascript:notif()" >
<fieldset>
<div class="control-group">
<label class="control-label" for="focusedInput">nom</label>
<div class="controls">
<input name="nom" class="input-xlarge focused" id="focusedInput" type="text" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="date01">Date</label>
<div class="controls">
<input type="text" name="date" class="input-xlarge datepicker" id="date" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Titre</label>
<div class="controls">
<input name="page" class="input-xlarge focused" id="focusedInput" type="text" value="">
</div>
</div>
...
and the Javascript to retrieve the fields:
var s_data = $('#myform').serializeArray();
$.get("webAdd?nom="+s_data[0].value+"&date="+s_data[1].value+"&titre="+s_data[2].value+"&message="+s_data[3].value+"&page="+s_data[4].value+"&commentaires="+s_data[5].value,function(response) {});
my problem is quite simple but I'm not able to solve it: as soon as any of the s_data[x] field contains a text such as "25% discount" the text field retrieved is null.
I know that % character is used for other purpose but how can I retrieve the field with any special character ?