Skip to main content
Participant
April 4, 2014
Question

What is the best practice to set Captivate variables from Get (less ideal) and Post (more ideal)?

  • April 4, 2014
  • 1 reply
  • 219 views

We are trying to set a couple of variables in Captivate 7 by posting the information from a URL. Is there a best practice for doing this, or does it require a custom JS or other call in order to do this?

Essentially, we want to pass three variables from a URl to named variables in a Captivate 7 swf so that the information can be drawn from a database, and does not need to be entered by the user.

Suggestions, thoughts, pointers to where we may be able to find this information - all would be greatly appreciated!

This topic has been closed for replies.

1 reply

TLCMediaDesign
Inspiring
April 4, 2014

Not sure how Captivate treats FlashVars internally, but the native html template includes a script to read URL parameters:

var strURLFull = window.document.location.toString();

var intTemp = strURLFull.indexOf("?");

var strURLParams = "";

then:

if(strURLParams != "")

  {

   so.addVariable("flashvars",strURLParams);

  }

It also has a script to add variables but you'd have to parse the variables first first to use it:

so.addVariable("variable1", "value1");