Copy link to clipboard
Copied
I created a username and password.
The password has to have a special character (e.g. !@#$%^&*) as part of their password. The problem I am experiencing is that Actions Script cannot read a lot of special characters e.g. 1234#. The # plays havoc with the string.
My question is how can Action Script read this string value as a #? How can I get Action Script to read these special characters without having a negative impact on the code?
Here is an example of my code:
<fx:Declarations>
<s:HTTPService id="handleRequestLogin" result="feedRequestLoginService_resultHandler(event)" resultFormat="e4x" fault="faultHandler(event)" showBusyCursor="true"/>
</fx:Declarations>
private function login():void
{
feedRequestLogin="http://www.server.com/api/xml?action=login&login=" + tiLogin.text + "&password=" + escape(tiPassword.text);
handleRequestLogin.url=feedRequestLogin;
handleRequestLogin.send();
}
Thank you
I have finally found the answer...
The # should be replaced with %23 i.e.
var feedRequestLogin = "http://www.server.co.za/api/xml?action=login&login=email@address.com&password=1234%2A//www.server.co.za/api/xml?action=login&login=email@address.com&password=1234%2A";
handleRequestLogin.url=feedRequestLogin;
handleRequestLogin.send();
This is what I had problems with ".....password=1234%2A";
The %2A turns it into a #.
Thank you
Copy link to clipboard
Copied
I have finally found the answer...
The # should be replaced with %23 i.e.
var feedRequestLogin = "http://www.server.co.za/api/xml?action=login&login=email@address.com&password=1234%2A//www.server.co.za/api/xml?action=login&login=email@address.com&password=1234%2A";
handleRequestLogin.url=feedRequestLogin;
handleRequestLogin.send();
This is what I had problems with ".....password=1234%2A";
The %2A turns it into a #.
Thank you