PDA

View Full Version : MForm works when test in MX, but not from Server, HLP!


Gary's Strudel
02-04-2003, 08:05 AM
Hello!

When I test *.swf in MX mail Form work correct. But it doesn"t work when I put movie on server.
function on the Button is :
loadVariables("http:\\www\mysite\cgi-sys\somescript.pl", _root,"POST")
The sevice told me that their CGI doesn"t send any variables in generall to user (to Flash in this situation). Are they right? They told me that their CGI builds only HTML page with info for user, such as "OK!"But I need variable "Success" from Server. AM I right?
That is the second question: My script wates answer from Server:
If(success=="1"){
gotoAndStop("success")
else {wait......
Sorry dont have source infront of me. Hope idea is clear:"Wait, if no answer, stop all"
And server did not return time when the variables were recieved. Is it wrong with CGI?
I hope to get any help, Please friends!:rolleyes:

tg
02-04-2003, 03:20 PM
with mx, use loadvars... it is easier to deal with... the code would look something like this:

var loader=new LoadVars();
loader.onLoad=function(done){
if(done){
gotoAndStop("success");
}
};
loader.load("http:\\www\mysite\cgi-sys\somescript.pl");
//for debugging purposes you can add this line:
loader.send("http:\\www\mysite\cgi-sys\somescript.pl","_blank","POST");
//this will popup your cgi file into a new window, you should be able to see any script/server errors displayed in the window.


just remember, when using loadvars() object, any variables you load will be loaded into the loadVars object, not into your timeline, so if you want them on your timeline, you can do that either inside you onLoad event, or anytime after the file has been loaded by refering to your loadvars object.

tg
02-04-2003, 03:23 PM
it may be a typo on your part, but should there be a '.' instead of a slach in the path to your cgi file?
www.mysite.cgi-sys.....??

freddycodes
02-04-2003, 04:40 PM
http:\\www\mysite\cgi-sys\somescript.pl


This is not a valid url, its never gonna work that way.

Can you call that address up in the browser? You need to figure how to view that perl script in a browser and use that address, maybe something like

http://www.mysite.com/cgi-sys/somescript.pl


But I have no idea what your setup is.

Gary's Strudel
02-04-2003, 06:13 PM
I will try this steps:)
Of course it is a big mistake with slashes - "\\". I was very ashamed :(. But I did it only in posting, not in my script of course.
Important for me to get ifo from server. I will try to debug with it.