postNetText and netDone
hello,
i have question postnettext , netdone command.
in case send string server using postnettext command.
this no problem. command send information php file.
the problem show feedback error messages.
i found on internet can netdone command.
the problem file send correct, netdone keep giving me error message.
if use breakpoint ok , netdone gives me correct output.
some code:
here send information (this ok)
gnetid = postnettext("http://dev-site.com/telesiminar/save.php",tdata)
on exit of frame go else statement (even if file sended correct)
on exitframe me
if myweblock = true then
if (netdone(gnetid) = true) , (neterror(gnetid) = "ok")
alert "it ok !"
myweblock = false
else
alert "failed send reason: " & dumpneterror(neterror(gnetid))
myweblock = false
end if
end if
end
what can mistake ?
you checking neterror() if upload not complete. perhaps should wait until netdone() returns true before checking neterror(). under circumstances, neterror() may return "" or 0. best check non-zero integer, sure result indicates true error.
on exitframe me
if myweblock = true then
if (netdone(gnetid) = true) then
-- server has returned result, either success or failure
verror = neterror(gnetid)
if not integerp(verror) then
-- convert "" , "ok" 0 = no error
verror = 0
end if -- integerp(verror)
if not verror then
alert "it ok !"
else
alert "failed send reason: " & dumpneterror(verror)
end if -- verror
myweblock = false
end if -- netdone()
end if -- myweblock
end
More discussions in Director Basics
adobe
Comments
Post a Comment