1 Reply Latest reply on Jul 29, 2009 12:30 PM by majester8425

    Any way to read posted values from calling html page

    majester8425 Level 1

      Here's the situation. I have an html web page which I can not change which called another html web page and posted some variables using the form tag.

       

      I want to now replace that call to a new Flex application. However how can I read the posted values in the flex application. Remember I can not change the HTML source in any way, just the Flex application.

        • 1. Re: Any way to read posted values from calling html page
          majester8425 Level 1

          I found a simple solution. I only have 1 posted value so I didn't create a class just added the following to the first Application component.

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          var

           

           

          postedKey:String;

           

           

           

          var postedValue:String;

           

           

           

           

           

           

           

           

           

           

          var postedDelim:int;

           

           

           

           

           

           

           

           

           

           

          var postedString:String;

           

           

           

           

           

           

           

          postedString = ExternalInterface.call(

          "window.location.search.substring",1);

           

           

           

           

           

           

           

           

          paramDelim  = postedString.indexOf("=");

          parmKey      = postedString.substring(0,postedDelim);

           

           

          parmValue   = postedString.substring(++,postedDelim);

           

          Alert.show(parmKey +

          " ----------- " + parmValue);