Question
weired error with LoadVars
Hi,
the movie i made is calling 2 different asp function which update a DB and
return an updated XML if all is fine.
i'm doing this using a 'LoadVars' object, with the 'sendAndLoad' method.
when i'm testing it in the working environment all works fine. when i'm
testing it inside a browser (after i put my swf in the local server), one of
the functions does what its suppose to do, however the other one keeps
failing...
this is my code basically:
var setData:LoadVars = new LoadVars();
setData.onLoad = function(ok) {
if (ok) {
trace("ok");
} else {
trace("fail");
}
}
...
function updateImp(){
var params = "setImp&id="+impId;
params+="impText="+impText;
...
setData.sendAndLoad(aspPath+"calendarFunctions.asp?f="+params,setData)
}
function updateTraining(){
var params = "setTraining&id="+trainId;
params+="trainText="+trainText;
...
setData.sendAndLoad(aspPath+"calendarFunctions.asp?f="+params,setData)
}
both function work fine in the authoring environment, however only the first
one functions online, the second one always returns 'fail' in the 'onLoad'.
just for testing, i replaced in the second function the 'sendAndLoad' with
just 'send' -
'setData.send(aspPath+"calendarFunctions.asp?f="+paramsList,"_blank");' -
and guess what, in the window that was opened i got the XML i was expecting
to...
on the server side, the functions in the asp file are identical, so that not
the place to look for the bug either.
any ideas?!?!?!?!?
thanks,
eRez
the movie i made is calling 2 different asp function which update a DB and
return an updated XML if all is fine.
i'm doing this using a 'LoadVars' object, with the 'sendAndLoad' method.
when i'm testing it in the working environment all works fine. when i'm
testing it inside a browser (after i put my swf in the local server), one of
the functions does what its suppose to do, however the other one keeps
failing...
this is my code basically:
var setData:LoadVars = new LoadVars();
setData.onLoad = function(ok) {
if (ok) {
trace("ok");
} else {
trace("fail");
}
}
...
function updateImp(){
var params = "setImp&id="+impId;
params+="impText="+impText;
...
setData.sendAndLoad(aspPath+"calendarFunctions.asp?f="+params,setData)
}
function updateTraining(){
var params = "setTraining&id="+trainId;
params+="trainText="+trainText;
...
setData.sendAndLoad(aspPath+"calendarFunctions.asp?f="+params,setData)
}
both function work fine in the authoring environment, however only the first
one functions online, the second one always returns 'fail' in the 'onLoad'.
just for testing, i replaced in the second function the 'sendAndLoad' with
just 'send' -
'setData.send(aspPath+"calendarFunctions.asp?f="+paramsList,"_blank");' -
and guess what, in the window that was opened i got the XML i was expecting
to...
on the server side, the functions in the asp file are identical, so that not
the place to look for the bug either.
any ideas?!?!?!?!?
thanks,
eRez
