[Xerte] Re: Bouncing an asp page

Paul Swanson Paul.Swanson at harlandfs.com
Tue Jun 14 16:54:29 BST 2011


At the asp end, treat it like it was POST data. sendAndLoadVars defaults
to POST, you can add an optional third argument of "GET" if you want to
use that method.

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Tuesday, June 14, 2011 8:35 AM
To: Xerte list
Subject: [Xerte] Re: Bouncing an asp page

 


Paul, I can assure you it is failing. ;-)
I have a send email just prior to the response.write (I am returning
values).

But I see you are using a literal LoadVars object.
So I have misinterpreted: 

Usage

iconID.sendAndLoadVars(url, loadVarsObject);



I was using

objData = new Object();
objData.dummy = 'testlv';
send_email.sendAndLoadVars('http://www.blah.com/cj/mail.asp', objData);

objData = new LoadVars(); //of course solves it.

Duh.
Thanks for opening my bleary eyes.


So at the asp end is that object access by Query or Form?
  

________________________________

Date: Tue, 14 Jun 2011 08:08:17 -0700
From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Bouncing an asp page

It's probably not failing, just not returning anything so Xerte doesn't
have anything to do. If your asp script echoes back any values, they'll
be captured as an object:

 

// send data to php script

URLString = domain + '/wbt/app/admin/selfpaced_xerte_queries.php';

 

sendVars = new LoadVars ();

sendVars.action = 'getData';

sendVars.sid = student.id;

 

// send to db

mainMenu.sendAndLoadVars (URLString, sendVars); // mainMenu is the page
ID

 

===================

 

Then use an event interaction with onSendAndLoadVars as the event. The
returned values are assigned to an object named loadVars (I think
ActionScript defaults to that name, I don't know if you can change it).
My script returns variables (using either echo or print) such as
'message' and 'error_code' and I access them like so:

 

message = mainMenu.loadVars.message;

errorCode = mainMenu.loadVars.error_code;

 

Pretty simple once you get the hang of it.

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Tuesday, June 14, 2011 7:40 AM
To: Xerte list
Subject: [Xerte] Re: Bouncing an asp page

 


xmlData = new XML();
xmlData.dummy = '<myDummy/>';
send_email.sendAndLoad(xmlData, 'http://www.blah.com/cj/mail.asp');

//works


objData = new Object();
objData.dummy = 'fred';
send_email.sendAndLoadVars('http://www.blah.com/cj/mail.asp', objData);

//fails

Is this failing because at present the asp returns nothing?
a la Authorware? 




________________________________

From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Tue, 14 Jun 2011 14:56:44 +0100
Subject: [Xerte] Re: Bouncing an asp page

One way or another you will have to send text, so will have to get your
data into xml or load vars, or send it as an xml payload, as text in a
format of your choosing.

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 14 June 2011 14:55
To: Xerte list
Subject: [Xerte] Re: Bouncing an asp page

 


But I want to send data, just not in xml.

blah = new object();
blah.one = 'fred';

etc

________________________________

From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Tue, 14 Jun 2011 14:51:48 +0100
Subject: [Xerte] Re: Bouncing an asp page

Send a dummy.

 

<myDummy/>

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 14 June 2011 14:51
To: Xerte list
Subject: [Xerte] Re: Bouncing an asp page

 


OK, but say I don't want to send XML.

________________________________

From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Tue, 14 Jun 2011 14:48:05 +0100
Subject: [Xerte] Re: Bouncing an asp page

Yep. Then see if iconID.onSendAndLoad fires - test to a local html file
or text file or xml file or...

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 14 June 2011 14:47
To: Xerte list
Subject: [Xerte] Bouncing an asp page

 


OK, just want to make sure I have this right:

sendAndLoad

iconID.sendAndLoad(xml, url);

Posts.
Wants the data in the form of an XML object, i.e. new XML()
Object first parameter.
=====================










This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.
Please do not use, copy or disclose the information contained in this
message or in any attachment. Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham. 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation. 

_______________________________________________ Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and
any attachment are intended solely for the addressee and may contain
confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email
do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation. 


_______________________________________________ Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and
any attachment are intended solely for the addressee and may contain
confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email
do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation. 


_______________________________________________ Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and
any attachment are intended solely for the addressee and may contain
confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email
do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation. 


_______________________________________________ Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and
any attachment are intended solely for the addressee and may contain
confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email
do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110614/b296960f/attachment-0001.html>


More information about the Xerte mailing list