PDA

View Full Version : Using the results from forms



tranism
July 11th, 2003, 07:43 PM
Basically I would like to display what my server side script sends back after I submit my form. The results need to be displayed in my scroller box. I started to write it out but I am stuck. Any help would REALLY be appreciated. :)

//variables being sent to server
//txtZip (input text) and cboDist (comboBox Component) are the variables
formData = new LoadVars();
formData.txtZip = "";
formData.cboDist = cboDist.getValue();

//object for replyData
//Hopefully after this form is submitted, the server sends it's repsonse to 'replyData'
//If successfully loaded, the output in displayed in my scroller boxed aptly names 'scroller
replyData.onLoad = function() {
if (success) {
trace("done loading");
scroller.html = true;
scroller.htmlText = this.textfield;
} else {
trace("not loaded");
}
}

//function for submit button
onSubmit = function() {
formData.sendAndLoad("http://www.bcbg.com/zipcodesearchF.php", replyData, "POST");
}

tranism
July 11th, 2003, 08:09 PM
Anyone, help? :(

Mr. Twinkles
July 12th, 2003, 01:46 PM
Can you post your fla?

Mr. Twinkles
July 12th, 2003, 01:54 PM
Try this:
formData.onLoad = function() { //changed it to formData instead of replyData
if (success) {
trace("done loading");
scroller.html = true;
scroller.htmlText = replyData.textfield;//changed to where the variables are sent
} else {
trace("not loaded");
}
}

if this works, it may be that all your variables were being sent, but that you weren't getting them from the right place.

let me know if it doesn't work...

tranism
July 13th, 2003, 10:41 PM
I hope this helps. I still can't think of why this isn't working. If you can help, I'll make a little shrine to you. :cyborg:

You can download the .fla @
http://www.tranism.com/storelocator.html

I can't post it here cuz it says the file is too big. Sorry