1 Reply Latest reply on Apr 26, 2010 1:40 PM by TheBorg[NL]

    URL Variables. How to work with them?

    Luis Pedro Ferreira Level 1

      Hey. it's me again with another questiom!!

       

      Yesterday i was finishing a webshop i'm building with Flex 4 and i needed to call a bank page to make the payment. For that i hade to send some values which i thought it could be possible with URLVariables. Well, i can't say that's not possible but when i have to use variables with the "_" character that's where everything gets more complicated cause Flex sends it like some weird characters "%2%" (something like this.

       

      Then i want to te documentaation and thought i've found the solution isind the decode, but it stills sending the variable as "%2%" instead of the "_".

       

      Now, even if you found a way to send the variabe value correctly "word1_word2", how are we going to past the VARIABLE NAME with the same character???

       

      Example:

              public function URLVariablesExample() {
                  var url:String = "http://www.[yourDomain].com/application.jsp";
                  var request:URLRequest = new URLRequest(url);
                  var variables:URLVariables = new URLVariables();
                  variables.exampleSessionId = new Date().getTime();
                  variables.exampleUserLabel = "guest";
                  request.data = variables;
                  navigateToURL(request);
              }
      

      Everything works fine with this example above, but if you need to use a variable (bank api request - nothing i can do to change it) that is for exampe "example_sessionId"?

       

      Hope you understand my question and br able to tell me what to do to make it work!

       

      Thanks!!

      LP