CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 [resolved] - AJAX JAVASCRIPT COMBINATION RAWURLENCODE (PHP) - ENCODEURLCOMPONENT (JAVASCRIPT)

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.