Something strange about Input Text Boxes

Okay, here’s the problem. I have an input text box in my form. Whenever I test the file locally on my machine, everything works. But when I upload the file to my server and test it, the last character is always dropped from the Input text box so I get an error.

My Input text box is for entering a zip code so you must have 5 digits. Say for example I enter “91505”, when I do a trace using php on my server, I notice that only “9150” is being sent to the script, there-by generating an error since that isn’t a valid zip code. Its with any digit, regardless of whether its a 5, 0, 1, etc…, flash only sends the first 4 digits.

Wassup with that???:scream:

Did you use any code ?

What do you mean? Actionscript for the Input Text box? Yah I did, its in a LoadVars instance . . ., here’s a snipet
[AS]
//so i create me LoadVars instance
formData = LoadVars();
//then I initialize my formData variables
formData.txtZip = “”
//then i gather the information into my LoadVars instance.
//I used the “escape” thingy hoping that maybe that would help… it didn’t
formData.txtZip = escape(txtZip.text);
[/AS]

HELP ME OH FLASH MX GODS!:cowboy:

Did you use a variable for the textfield or did you give it an instance name ?

[AS]formData = new loadVars();
formData.txtZip = “”;
formData.txtZip = escape(txtZip.text);[/AS]

Where txtZip is the instance name of your inputfield. Is that all the code you used ? Please post the whole code.

I left the var field in the properties panel empty and just gave the text field an instance name of “txtZip”. Here’s the code
[AS]
function onSubmit() {
//Create a new LoadVars instance for the form data
formData = new LoadVars();
//Initialize formData variables
formData.txtZip = “”;
formData.cboDist = “”;
formData.dealer = “stores”;
//Gather the information into a LoadVars Instance
formData.txtZip = escape(txtZip.text);
formData.cboDist = cboDist.getValue();
formData.dealer = “stores”;

//Create another LoadVars instance to receive the server's reply
replyData = new LoadVars();
//Initialize reply variable
replyData.reply_txtZip = "";
replyData.reply_cboDist = "";
replyData.reply_dealer = "stores";
//Specify a function to call when this new instance receives the reply
replyData.onLoad = handleReply;
//Submit the data
formData.sendAndLoad("http://www.fabrizio-gianni.com/fg2003/flash/swfs/zipcodesearch.php", replyData, "POST");
//Telling the user what is happening
scroller.text = "Please wait while your information is being processed. . .";

}
function handleReply(success) {
if (success) {
trace(“done loading”);
scroller.html = true;
scroller.htmlText = replyData.textfield;
} else {
scroller.text = “There was a problem submitting your information. The server my be down or not responding.”;
}
}
[/AS]

It was Safari’s fault!. I just tested it with Mozilla, Netscape, AOL, Explorer, and Opera. IT WORKS. It’s just safari that it acts screwy. OH THIS MAKES ME MAD! All those other times when I’ve had strange problems like this may have all just been safari related. :pirate: