More information: In the ASP page I have a URLdecode function to use it before insert the data:
<script language=JavaScript RUNAT=SERVER> function URLDecode(psEncodeString) { return unescape(psEncodeString); } </script> I test with this one too: Private Function URLDecode_vbs(byVal encodedstring) Dim strIn, strOut, intPos, strLeft Dim strRight, intLoop strIn = encodedstring strOut = "" intPos = Instr(strIn, "+") Do While intPos strLeft = "" strRight = "" If intPos > 1 then strLeft = Left(strIn, intPos - 1) If intPos < len(strIn) then strRight = Mid(strIn, intPos + 1) strIn = strLeft & " " & strRight intPos = InStr(strIn, "+") intLoop = intLoop + 1 Loop intPos = InStr(strIn, "%") Do while intPos If intPos > 1 then strOut = strOut & Left(strIn, intPos - 1) strOut = strOut & Chr(CInt("&H" & mid(strIn, intPos + 1, 2))) If intPos > (len(strIn) - 3) then strIn = "" Else strIn = Mid(strIn, intPos + 3) End If intPos = InStr(strIn, "%") Loop URLDecode = strOut & strIn End Function Thanks! Xavier On 12 mayo, 07:48, sithram <[EMAIL PROTECTED]> wrote: > Hello! > > I need to can use ISO-8859-1 in send data to server with the > (selector).ajaxForm(options). I see that uses encodeURIcomponent in > serialize parameters, and this does that the sending information uses > strange codes. > > initial text > recieved text > després > després > informació > informació > > If have this code: > > var opt = { > target: '#avis', > beforeSubmit: showFORM, > success: saveFORM > }; > > $('#frm').ajaxForm(opt); > > function showFORM(formData, jqForm, options) { > var queryString = $.param(formData); > qs=queryString.split('&'); > for (var x=0;x<qs.length;x++) { > i=qs[x].split('='); > if (i[0]=='cmt') { > alert('cmt (decode):\n\n'+decodeURI(i[1])); > alert('\n\ncmt:\n\n'+i[1]); > } > } > return true; > } > > In the message box I think that the decode information is that I need > to send, not the encode one. > > This information is managed with an ASP page that insert it in a > database. This ASP have <%Response.Charset="ISO-8859-1"%>, but it > doesn't seem work (I think that is a normal behavior because the ASP > page has to recieve data, it doesn't send data to client). > > If you need more information, you don't hesitate to ask me for it. > > Thanks a lot! > > Xavier