Hi,
Thank you for your enquiry.
I would first recommend setting the URL to your script file to a string:
Code:
var url = "http://yourdomainname.com/scriptfile.php"
Now create the object which will contain the member set:
Code:
var obj = new Object()
Now get the data from the server and store it to a new object named 'output':
Code:
var output = InternetPostData(url,obj,true)
This 'output' object will now have the properties 'Name', 'Age' and 'ShoeSize', defined by the name-value pairs being sent by the server. We can now store these 'properties' to publication variables:
Code:
var Name = output.Name
var Age = output.Age
var ShoeSize = output.ShoeSize
The complete set of script actions should now read as follows:
Code:
var url = "http://yourdomainname.com/scriptfile.php"
var obj = new Object()
var output = InternetPostData(url,obj,true)
var Name = output.Name
var Age = output.Age
var ShoeSize = output.ShoeSize
Now open the properties of your publication, select the
Variables tab and create three new publication variables named 'Name', 'Age' and 'ShoeSize' with blank default values.
Finally, create a text object on the page and insert these three variables into the text object. Preview the publication and the values sent by the server should now be displayed.
I hope this helps. Please do not hesitate to contact me if you have any further queries.
Kind regards,