Accessing a VAR from within a Function

I'm sure this is a simple question, but I have been batteling
it all night. I am pulling data from a database, this works fine.
the data loads into flash fine, but I cant figure out how to use
this data outside of the function.
I have looked at global var, timeline vars, but I must be
missing something. I have attached my code, if you run it, it will
load the data, I left the link live.
In the function the data traces correctly, outside of the
function it fails.
Thanks
~Chris

Ok, I attempted this last night, and I am unning into an issue.
Heres what I have, I am pulling data from a mySQL database, into a
php file that includes XML, Here is the PHP Script.
$query = "SELECT * FROM Teams WHERE active = 'Y'";
$resultID = mysql_query($query, $linkID) or die("Data not
found.");
$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output .= "<teamData>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<item>\n";
$xml_output .= "\t\t<teamName>" . $row['TeamName'] .
"</teamName>\n";
$xml_output .= "\t\t<manager>" . $row['Manager'] .
"</manager>\n";
$xml_output .= "\t\t<order>" . $row['LeagueOrder'] .
"</order>\n";
$xml_output .= "\t</item>\n";
$xml_output .= "</teamData>";
echo $xml_output;
?>
NOTE: This script does run fine, if I run the PHP I do get the
correct results.
so I modified the Action Script you sent me a little to fit
my PHP script. but I must be missing something. I think the problem
is, what part of my XML goes after "studentData
newTextField.text = studentData
.teamName + " :: " + studentData.manager + " :: " +
studentData
.order;
Thanks Again for the help
/////////////////////////////////////////////////////////////////////////////////////

Similar Messages

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • Invoking "this" from within a function

    Assume we are in this situation:
    mc.onRollover=function()
    trace(this);
    function dosmthing()
    trace(this);
    The first trace(this) would render the path of the movieclip,
    mc. The second one, however, would render "undefined". Is there a
    way of retrieving the path of the movieclip from within the
    function? I can't hardcode it, since it's dinamically assigned.

    try using a variable:
    mc.onRollOver=function() {
    var t:MoveClip = this;
    trace(t);
    function dosmthing() {
    trace(t);
    //OR pass a reference of 'this' to the function ...
    mc.onRollOver=function() {
    dosmthing(this);
    function dosmthing(t:MovieClip) {
    trace(t);
    'dosmthing' is a 'nested' function, not an 'assigned'
    function, so does not have a path reference.

  • Changing Property Values from within a Function

    I'm wondering how I can change a property of an instance from
    within a function inside a method. I have some code here...
    Basically I just need to set _lynn_idle to false when a tween is
    occuring and _lynn_idle to true when the tween is finished.
    Unfortunately I can't seem to simply set it to false or true inside
    these listener functions like I'm able to anywhere else (seems the
    variable is only local to the function when I need it to access the
    variable associated with the instance). Any help is much
    appreciated.

    Inside callback handlers the class members go out of scope.
    To remedy use a local (local to the function) reference to the
    current object.

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Accessing JAXR registry from within web service

    Hi I'm having trouble accessing the registry from within a web service running in the tomcat server.
    The service should register with the registry at startup, but in the logs from the tomcat server I can see that a JAXRException is thrown:
    javax.xml.registry.JAXRException: Unable to create ConnectionFactory: Provider com.sun.xml.registry.common.ConnectionFactoryImpl not found
         at javax.xml.registry.ConnectionFactory.newInstance(Unknown Source)
    If I run the program from outside the tomcat server as a standalone program, it registers perfectly.
    I believe the problem is that it is missing one or more jars.
    I have tried to put the jaxr-jars under shared/libs but that hasn't solved the problem.
    Has anyone an idea of what I'm doing wrong?
    Help is greatly appreciated!
    / Bo

    Hi swatdba
    I know that the build file states alle the packages that I need, and as I said, if I run my program like the regular JAXR examples, it works fine.
    The thing is, the JAXR examples are not web services on their own. They are merely Java programs that access the registry.
    In my case I am building a web service that should run in the tomcat server. When it initialises, it should register with the register, and also be able to search for other web services.
    I thought this would be possible per default, ie. the jars that the web service needs should already be available in the tomcat server, but it doesn't work. I have tried to put the jars that I've found in the build script in the folder C:\jwsdp-1.3\shared\lib, which according to the tomcat manual should be used to put jars that you want to share between your web services.

  • Is it possible to insert a url link into the itunes description tag. I want the user to be able to access my webpage from within itunes

    Hi,
    Is it possible to insert a url link into the itunes description tag in a feed. I want the user to be able to access my webpage from within itunes
    Thanks

    In the next release, we will be making adding our Measurement Studio components to existing projects much easier, but for now what you would need to do is add the support for Measurement Studio to your MFC project manually as detailed in our Knowledgbase at:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/0cb6707522e92c958625689e0052bb77?OpenDocument
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • How can I access applet paramters from within javafx?

    I have a simple javafx applet from the clock tutorial, but I would like to initialise this from parameters that are specified in the <APPLET> tag, for exaple <param name="timeZone" value="America/Los_Angeles">My question is how do I access this parameter from within javafx?
    Thanks,
    Phil

    I'm looking for the same answer, if anybody knows ... ;)

  • Accessing java objects from within javascript

    Hello,
    Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
    Thanks in advance,
    Antana.

    What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?

  • Accessing iPad camera from within DPS application

    I have a potential client who asked me if it were possible to access the camera from within a DPS application. I have no further information at this point regarding what the reason for it will be but thought I'd shoot the question out anyway. Apparently it is possible in iOS 6 to access the camera in mobile Safari but I don't know if that is of any help.
    Thoughts? Thanks!
    :jaj

    See http://forums.adobe.com/message/5040166#5040166.
    Neil

  • ORA-14551 Call to a proc that performs INSERT from within a FUNCTION

    Anyone,
    I have written a number of functions that serve to convert an old_value to a new_value. But there are some times when the conversion fails. I wish to log those exceptions into a table and move on. I undertand FUNCTIONS are not to insert data but that is why I created a PROC and want to be able to call it from within the FUNCTIONs.
    Is there any way to get around the ORA-14551 error?
    Here is what I have:
    CREATE OR REPLACE FUNCTION MAXIMO.fcn_get_worktype
      ( worktype_IN IN varchar2,
        siteid_IN IN varchar2)
      RETURN  varchar2 IS
      var_worktype varchar2(5);
    BEGIN
         IF siteid_IN IN ('ML','OK','BE') THEN
            BEGIN
                 SELECT NVL(NEW_WTYPE,NULL)
                INTO var_worktype
                 FROM MAXIMO.MAX411_WBK_WORKTYPE$
                 WHERE OLD_WTYPE = worktype_IN;
            EXCEPTION
                WHEN NO_DATA_FOUND THEN
                    MAXIMO.SP_CONVERSION_EXCEPTION('WORKTYPE', 'WORKTYPE', worktype_IN, siteid_IN);
                    var_worktype := 'XX';
                     RETURN var_worktype;
            END;
        END IF;
        RETURN var_worktype ;
    END;And here is my PROC:
    CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
    IS
    BEGIN
        INSERT INTO MAXIMO.MAX411_CONVERSION_EXCEPTIONS
             ( TABLE_NAME,
             COLUMN_NAME,
             VALUE ,
              TAB_ID)
        VALUES
             ( table_IN,
             column_IN,
             value_IN,
              tab_ID );
        EXCEPTION
            /* If value was already recorded then do not record again, Key is on all three columns */
            WHEN DUP_VAL_ON_INDEX
                THEN
                    NULL;
        COMMIT;
    END;Can anyone shed any light on how I can stop getting:
    ERROR at line 1:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "MAXIMO.SP_CONVERSION_EXCEPTION", line 5
    ORA-06512: at "MAXIMO.FCN_GET_WORKTYPE", line 16
    ORA-01403: no data found
    ORA-06512: at "MAXIMO.LOAD_PM", line 181
    ORA-06512: at line 1
    Thanks in advance for any help I can get...
    Miller

    You need a PRAGMA AUTONOMOUS_TRANSACTION in your exception procedure, eg:
    CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
    IS
      PRAGMA AUTONOMOUS_TRANSACTION
    BEGIN
      ...

  • T400s and T500 experiencing slow response time accessing certain websites from within our network

    Hello there.... we have some Lenovo T400s running Windows 7 and T500 running WinXP Pro that are experiencing slow response time when trying to access certain website from within our company network (particularly this global crossing Web meeting, google maps): https://core1.callinfo.com/interface/guest.jsp?host=globalcrossing ... it takes 10-15 minutes before it loads the meeting login screen and same response time for google maps to respond as well... the thing is, other Lenovo T400s, T61, and other HP desktop machines that are connected to the same network in our company does not experience this slow response time... HOWEVER, when these problematic T400s / T500 laptops are connected to external network (e.g. home DSL, hotel DSL/Cable modem) the problem goes away.   Our NETWORK ran tests to monitor traffic to the websites from our company's network but seem to connect just fine... just wondering if anybody out there experienced the same problem and know of a solution.  By the way, the two newer T400s that are experiencing the slow response time have the following BIOS version 1.11 (6HET26WW) and BIOS version 1.09 (6HET24WW).  Then a T400s that is also connected to the same network but not experiencing the problem has a BIOS version of 1.02 (6HET17WW - running WinXP Pro).   NOTE: We also connected a Linksys USB wireless adapter to connect to our wireless network in the company but same problem - and problem occurs even when connected via network cable.  Your feedback will be greatly appreciated.

    Network World posted an article about a free response time monitoring tool that would be worth checking out

  • Accessing cgi env vars from within html db

    Hello all
    Please can you tell me how to access the variables that are exported to the cgi environment of the apache webserver from within an html db application.
    Specifically, I have server ssl enabled on the apache server and want to display one of the exported variables:"SSL_SERVER_S_DN_CN" (=some.server.name) from within my html db application.
    Thank you.

    "423104",
    You can use the OWA_UTIL function to fetch values of CGI environment variables:
    select owa_util.get_cgi_env('SSL_SERVER_S_DN_CN') from dual
    Thanks,
    - Scott -

  • How to access a variable from within a symbol.

    How do I access a variable set outside a symbol from within that symbol?
    Thanks

    If you set a variable on stage ,say
    sym.setVariable("stageVariable", "I am stage variable");
    You can access it from within  a symbol using :
    var myVariable = sym.getComposition().getStage().getVariable("stageVariable");
    Basically you need to get handle to the symbol in which the variable is defined.

  • WRT610n access external ip from within LAN - NAT loopback

    Hi everybody,
    I've replaced my old ZyXEL P-320W with a WRT610n and lost one feature...
    I basically have a NAS assigned to IP 192.168.1.2, my router has IP 192.168.1.1 locally of course.
    Imagine I have IP X.X.X.X from the internet and that this IP is registered to myip.dyndns.org.
    In the old days (with my ZyXEL), I could ssh to my NAS using myip.dyndns.org from within my LAN, but now, I HAVE TO use the local ip (192.168.1.2) to access to it...
    I've done some research and found out that this feature is named "NAT loopback" and the closest to that feature I've found in the router configuration is "Filter Internet NAT Redirection" (in Security > Firewall) but enabling it or not does not make any difference...
    Did you guys already experience this? Is there a solution?
    Thanks in advance
    Jon

    Basically,to access the NAS...you have to use the local ip address...As far as the SSH is concerned,You need to open port 22 on the linksys router.Check this link.
    For logins using ssh keys permissions are very important to make it work. By default in WRT root's home directory is "/tmp". Create a directory called "/root" and changed root's home directory to this (edit the /etc/passwd file). Put your DSA and/or RSA keys in "/root/.ssh/authorized_keys" and "chmod -R go= /root" on the WRT. It should work...

Maybe you are looking for

  • Open Purhcase Orders

    Hello all, Can anybody tell how to find Open Purchase Orders? My requirement is as follows. I have Material No, from this i have to display the BOM with Vendor Name. When i have all the material, i have to pick the Vendor No from the open purchase or

  • Hyper-V as User on Windows Embedded 8.1 Industry Pro

    I believe I'm having permission issues when attempting to use Hyper-V on Windows Embedded 8.1 Industry Pro.  Hyper-V seems to install cleanly, and from an admin account I can use the Hyper-V Manager without issue and connect to a running VM.  However

  • 10.4 dns setup correct but not working

    i was working with a client to set-up VPN on an Xserve running 10.4 server; the server has been running fine for over a year and a half. We followed Apple instruction to connect the cable modem to one ethernet port (PCI), and left the internal networ

  • App Server Install

    Hi I would just like to find out which install of App Server 10g i would need On Oracle OTN there are 2 downloads available : - 10g AS – BI (Includes Apache & Discoverer, does not include Internet Directory etc-) - 10gAS – Full install Currently I've

  • Here's a challenge for you.

    whats wrong with my ipod- you name it. here's my issue. laptop was stolen. 1) used itunes 7.0 which i wasn't too fond of. now i am using my roomates comp but she only has itunes 6. my ipod will not register on her comp. she is not interested in using