# Can CDF file embedded in a web page receive external parameters?

I know that I can embed a CDF file inside a web page by using:

1. The embed tag.
2. An object tag with an embed tag inside (better than 1).
3. Using the JavaScript provided by Wolfram (better than 2).

My question is how can I pass some data to the CDF file. In the case of Flash, there is a flashvars attribute precisely for this, but I can't find the equivalent for this in Wolfram's CDF deployment documentation.

I need this because I plan to embed a CDF in a set of pages that are similar but each for a different set of data. And I want to generate a single CDF for all of them.

If this is not possible in this direction, I would be interested in knowing about solutions in the opposite direction: reading the DOM from the CDF file as this would solve my problem too.

UPDATE (June 16, 2015): This is now possible in CDF Player 10 with CurrentValue["PluginParameters"]. For more information, please see this community thread: http://community.wolfram.com/groups/-/m/t/309578

-

You cannot import data to a web embedded CDF:

http://www.wolfram.com/player-pro/how-player-pro-compares.html

...that is to say in principle you can't. However if you read this thread:

Deploying Mathematica Content Online

you will note that @Jens demonstrated that it was possible to import data from a URL. However after investigating this I was told by Wolfram that this was a bug that will be closed in future builds so you cannot rely on this.

-
Thank you. I guess I will need to use webMathematica, but this will put more workload on the server to generate over and over almost the same CDF file. In this particular area Flash has an advantage. –  Gustavo Delfino Mar 19 '12 at 2:20
With the release of Mathematica 9 URL importing is a free CDF feature. Please see @AndreKuzniarek answer for details. –  Vitaliy Kaurov Dec 6 '12 at 18:50

With Version 9, CDF Player is officially supporting import via URL. This is currently the only way to bring any data into a web embedded CDF or notebook, regardless of license level. Other methods are being explored, particular for exchanging data with the surrounding DOM. Stay tuned for more information on this to come.

Please consult the following table for an updated comparison of FreeCDF vs. Enterprise/Player Pro vs. Mathematica functionality:

http://www.wolfram.com/player-pro/how-player-pro-compares.html

and here for more details about FreeCDF vs. Enterprise licensing:

-
I gave Andre his first upvote - I'm famous!! –  Mark McClure Dec 6 '12 at 18:33
Andre I think what is still needed is enabling of JLink and other links (DatabaseLink is enabled of course) providing they are used within the CDF (as opposed to using Mma functionality from another interface). –  Mike Honeychurch Dec 6 '12 at 21:50
@MarkMcClure You are famous also for rare voting :) –  Artes Dec 6 '12 at 21:51
@Artes I can live with that! I do vote, but certainly not whimsically. I generally vote when I feel that I've learned something. As a long time user and parttime consultant, that doesn't happen too often. My students tell me that I'm stingy with points, too. Perhaps, there's a theme? :) –  Mark McClure Dec 6 '12 at 22:02
@MarkMcClure I'm not opposing with that, but on the other hand every so often good answers get few upvotes while poor ones get too many. I mean your votes are especially important. –  Artes Dec 6 '12 at 22:23

Apparently, one of the enhanced capabilities available in an enterprise license of Mathematica is the capability to send data to your CDF file just like when using Flash.