Expand my Community achievements bar.

returning data which can access AS function

Avatar

Level 1
I migrating from an HTML/Flash app previously built to an all
FLEX app. The previous app ran a db query through AJAX to an ASP
script and returned the results (basically a list of names) as a
series of forms (each name was essentially it's own form), which,
when clicked on, fired some javascript to do some other actions. A
single result looked like this:



<form style="margin: 0;" target="_blank" id="frm117"
action="
http://www.wispmon.com/gis/getcust.pl"
method="POST"><input type="hidden" name="CustomerID"
value="117" /><input type="hidden" name="WispID" value="
10001 " /><a href="javascript:void(0);"
onclick="link(frm117)"><font color="#FF0000">Monty
Smith</font></a>



The javascript function "link()" basically just submitted the
form to the cgi script.



I have the FLEX app calling the same ASP script and
returning the same results to a TextArea, but what I want is
instead of the results being a form and firing the javascript, I
want it to be a flex text field and have them fire some AS Function
which will perform the same action as my "old" app. I guess the
question is, can I build FLEX controls on the fly?
1 Reply

Avatar

Level 1
private function addTextArea():void

{

var textArea:TextArea = new TextArea();

addChild(textArea);

textArea.text = "TESTING";

textArea.x = 10;

textArea.y = 10;

}



Should work, not tested