Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 00:36
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Flash Remoting with AMF (Moderators: Flash-db, Musicman, Jorge Solis, papachan, nothingGrinder)
| | |-+  Upstream??
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 [2] Print
Author Topic: Upstream??  (Read 10037 times)
ev
Global Moderator
Systems Administrator
*****
Posts: 502



View Profile WWW
« Reply #15 on: 03/04/03, 15:39 »

i have the same problem.
i always need to do
conn.services(replyObject, data)
and then
var replyObject=new Object()
replyObject.onResult=function(result){
//codehere
}
if i do the _Result functions, the function wont execute.
ev
« Last Edit: 03/04/03, 15:41 by ev » Logged
Louis Simpson
Server what's that
*
Posts: 25



View Profile Email
« Reply #16 on: 03/04/03, 15:51 »

Yeah because your php script is expecting one argument and you are passing two.

What if you leave it at.
[script]
function addClient_Result(result) {
  trace ("Result = " + result);
}
function addClient() {
  var newClient = new Object();
  newClient.companyName = CompanyName;
  newClient.businessType = BusinessType;
  newClient.contactName = ContactName;
  newClient.Position = Position;
  newClient.phoneNumberAC = PhoneNumberAC;
  newClient.phoneNumber = PhoneNumber;
  newClient.faxNumberAC = FaxNumberAC;
  newClient.faxNumber = FaxNumber;
  newClient.email = Email;
  newClient.postalAddress = PostalAddress;
  newClient.city = City;
  newClient.state = State;
  newClient.country = Country;
  newClient.postcode = Postcode;
  newClient.streetAddress = StreetAddress;
  newClient.sCity = SCity;
  newClient.sState = SState;
  newClient.sCountry = SCountry;
  newClient.sPostCode = SPostCode;
  newClient.Url = Url;
  newClient.cdrom = CDROM;
  newClient.interest = Interest;
  trace("sent request. newClient: " + newClient.toString());
  scdbservice.addClient(newClient);
  }
}
[/script]
Logged
mrluke
Server what's that
*
Posts: 22



View Profile WWW Email
« Reply #17 on: 03/04/03, 16:01 »

Mine actually receives the addClient_Result(result) - Visible in the NetDebugger - Just will not execute the tasks in the function

[Script]

function addClient_Result(result) {
//doesn't do any thing here  
trace ("Result = " + result);
}
[/Script]

But when the default responder is added, SWEET, everything works.

Luke
Logged
ev
Global Moderator
Systems Administrator
*****
Posts: 502



View Profile WWW
« Reply #18 on: 03/04/03, 18:40 »

ok, i see how ur doing it louis...
then as i see it, using the _Result handlers is only an efficient option when sending [large amounts] of data and recieving a result back.
if ur only sending a simple argument, one which doesn't need to be constructed over a long amount of code (like an object or recordset object), then ur better off defining the result as a seperate object within the function that calls the service.  otherwise it just seems to me like cluttering your code.
but i can see why it would be good practice when something lengthy needs to be constructed and then sent to the server.
ev
Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything