CstAn
02-28-2007, 04:43 PM
Dear all,
I face problem with passing value between PHP and Javacript.
for example:
in PHP, i encode the value with "urlencode" function and pass to javascript.
but when i decode with javascript "decodeURIComponent" or decodeURI" function may not all the string will return to original.
*string = "A B C"; ->encode with php function
in javascript show A+B+C -> i assign to a text box/ alert out.
i found out that JSON class can be solve my problem but problem was the system is not developed by me since started. This was quite difficult for me to integrated the JSON with my system.
isn't have list that show out the string the encode by PHP function may not able to decode by javascript?
Pls help. Thanks a lot.
I face problem with passing value between PHP and Javacript.
for example:
in PHP, i encode the value with "urlencode" function and pass to javascript.
but when i decode with javascript "decodeURIComponent" or decodeURI" function may not all the string will return to original.
*string = "A B C"; ->encode with php function
in javascript show A+B+C -> i assign to a text box/ alert out.
i found out that JSON class can be solve my problem but problem was the system is not developed by me since started. This was quite difficult for me to integrated the JSON with my system.
isn't have list that show out the string the encode by PHP function may not able to decode by javascript?
Pls help. Thanks a lot.