CodeChargeMVP
Posts: 473
|
| Posted: 11/29/2010, 4:48 AM |
|
Hi,
I´m still improving my own dependent listboxes,
now I´m struggling about codifications,
I explain here the real scenario:
from javascript I do an asyncrone request to the php server
heres is the ajax.open function:
ajax.open("GET","../../template/funciones/tipovia.phpTipViaCanCod="+encodeURIComponent(TipViaCanCod),true);
I´ve read than isn´t necesarry decode the parameter on the php script since the get
method do itself.
Everything is ok by the way.
than the php script answer this way:
echo rawurlencode("".$NumeroDeRegistros."".$StringResponse);
finally I try to decode the answer from the php script with encodeURLComponent and then
says this error message:
"The identifier URL by decodifying hasn´t a valid codification";
żAnybody has battle with codifications ever?
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
CodeChargeMVP
Posts: 473
|
| Posted: 11/29/2010, 9:08 AM |
|
I´ve solve it, the solution was to answer on the script with rawurlencode() and decode on javascript with unescape().
Quote CodeChargeMVP:
Hi,
I´m still improving my own dependent listboxes,
now I´m struggling about codifications,
I explain here the real scenario:
from javascript I do an asyncrone request to the php server
heres is the ajax.open function:
ajax.open("GET","../../template/funciones/tipovia.phpTipViaCanCod="+encodeURIComponent(TipViaCanCod),true);
I´ve read than isn´t necesarry decode the parameter on the php script since the get
method do itself.
Everything is ok by the way.
than the php script answer this way:
echo rawurlencode("".$NumeroDeRegistros."".$StringResponse);
finally I try to decode the answer from the php script with encodeURLComponent and then
says this error message:
"The identifier URL by decodifying hasn´t a valid codification";
żAnybody has battle with codifications ever?
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
|