Welcome, Guest
  • Author Topic: Why doesn't this write to the variable until the 2nd time the button is pressed?  (Read 592 times)

    Jaylada

    • Seasoned Programmer
    • ***
    • Posts: 144
      • View Profile
      • Email
    When the button is first pressed, I can see in my debugger the data LocalID has a value, but why doesn't it write to the _root.PrimaryID until I press the button a second time?


    //////////////
    submit1.onPress = function(){

       getDatax.UniqID=UID;//Long string version of ID
             getDatax.sendAndLoad("GetID.cfm", getDatax, "POST") ;

    getDatax = new LoadVars()
        getDatax.onLoad = function(){       
           if(this.writing=="Acquired") {
                 _root.PrimaryID=this.LocalID;


          }}
    }

    Thanks in advance

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Check with charles, if the received data has the expected structure.
    happy flashing
    8)
    Ronald