Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
SendAndLoad Question

SendAndLoad Question

2004-02-12       - By John R. Hall

 Back
The following script works OK but as you can see, if you read the comments,
it feels all wrong. I just want to create a generic script that returns
whatever value I'm returning from the DB. Does the question make sense? Is
there an approach that I might use? As always, thanks for any ideas.

function getData(tableName, studentID, varName) {
  formData = new LoadVars();
  formData.tableName = tableName;
  formData.studentID = studentID;
  formData.variableName = varName;
  replyData = new LoadVars();
  replyData.onLoad = myOnLoad;
  function myOnLoad(success) {
    if (success) {

      // return(this.returnValue);

      // return above doesn't work for me because of
timing issues
      // I think. Setting a global variable below DOES
work
      // but I don't want to have to have a huge list of
      // variables. Is there a wait loop syntax that would
      // allow me to return without setting a global like
      // I did below?

      if (this.returnName == "notes") {
        _global.notes = this.returnValue;
        _level10.noteDisplay.text = _global.notes;
      }
    } else {
      trace("No return values from the ASP page.");
    }
  }
  formData.sendAndLoad(_global.dataPath+"dataGetter.asp", replyData,
"post");
}



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)





Earn $52 per hosting referral at Lunarpages.