# How do you embed a CDF in a Tikiwiki blog post?

**URL:** <https://community.wolfram.com/t/how-do-you-embed-a-cdf-in-a-tikiwiki-blog-post/1574>\
**Category:** Questions\
**Tags:** mathematica, computable-document-format, ui-ux-and-ide\
**Created:** [February 21, 2014, 6:57pm UTC](https://community.wolfram.com/t/how-do-you-embed-a-cdf-in-a-tikiwiki-blog-post/1574 "2014-02-21T18:57:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterglass](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/waterglass/32/26563_2.png) [@waterglass](https://community.wolfram.com/u/waterglass)\
**Post date:** [February 21, 2014, 6:57pm UTC](https://community.wolfram.com/t/how-do-you-embed-a-cdf-in-a-tikiwiki-blog-post/1574/1 "2014-02-21T18:57:15Z")

</div>

I’m tring to post a CDF to my Tikiwiki 12 blog but can’t get it to work quite right. I created a CDF to demostrate the Fermi-Dirac function. The fermidistribution.cdf file was uploaded to the file gallery with fileID=55. The femidistibustion.png was uploaded to the file gallery with fileID=56. The files can be retrieved in several ways as far as I can tell. The dlxx means download the file with fileID=xx. The displayxx means display file with fileID=xx. The files are loaded into the MySQL database instead of being stored in a directory.

I tried the two syntax options based on what the From Desktop to Web: Deploying Ideas with CDF video indicated. The first option uses the download syntax and the second option uses the display option. I call the html file using the Tikiwiki {IFRAME()} command in the blog posting. The {IFRAME()} command was used in the following forms and the resulting actions are indicated as well:

1. {IFRAME(width=“596” height=“614” scrolling=“no” src=[https://www.p-brane.com/nano/display64](https://www.p-brane.com/nano/display64))}{IFRAME} ?Yields a blank frame
2. {IFRAME(height=596,width=614, scrolling=auto)}tiki-print.php?field=64{IFRAME} ? Yields the home page with an error message
3. {IFRAME(width=“596” height=“614” scrolling=“no”)}tiki-download\_file.php?fileID=63{IFRAME} ? Yields a download box. If you open the file in the browser then the cdf plays and functions as expected.
4. {IFRAME(width=“596” height=“614” scrolling=“no” src=[https://www.p-brane.com/nano/dl64](https://www.p-brane.com/nano/dl64))}{IFRAME} ? Yields a download box (same as 3). If you open the file in the browser then the cdf plays and functions as expected.

What is the proper syntax to use so that the cdf runs without having to open a file to an new browser window or tab ( using IFRAME or something else)?

Option one has fileID=64

```auto
[color=#006400]<html>
<body>

<script type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script>
<script type="text/javascript">
var cdf = new cdfplugin();
cdf.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img src="https://www.p-brane.com/nano/dl56"></a>');
cdf.embed('https://www.p-brane.com/nano/dl55', 596, 614);
</script>

</body>
</html>[/color]

Option two has fileID=63

[color=#006400]<html>
<body>

<script type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script>
<script type="text/javascript">
var cdf = new cdfplugin();
cdf.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img src="https://www.p-brane.com/nano/display56"></a>');
cdf.embed('https://www.p-brane.com/nano/display55', 596, 614);
</script>

</body>
</html>[/color]

```

**Update 2/24/14**  
I discoverd that the following code runs in IE but not in Chrome and Firefox.

```auto
This code runs fine in IE.

{IFRAME(width="710" height="710" scrolling="no" src=https://www.p-brane.com/nano/display63)}
{IFRAME}

where display63 contains

<html>
<body>

<sc<x>ript type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script>
<sc<x>ript type="text/javascript">
var cdf = new cdfplugin();
cdf.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img src="https://www.p-brane.com/nano/display56"></a>');
cdf.embed('https://www.p-brane.com/nano/display55', 596, 614);
</script>

</body>
</html>

```

---

<div class="post-metadata">

**Author:** ![waterglass](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/waterglass/32/26563_2.png) [@waterglass](https://community.wolfram.com/u/waterglass)\
**Post date:** [February 24, 2014, 6:25pm UTC](https://community.wolfram.com/t/how-do-you-embed-a-cdf-in-a-tikiwiki-blog-post/1574/2 "2014-02-24T18:25:12Z")

</div>

I aslo posted this question over at the the Tikiwiki Community website as: [How do you embed a Mathematica CDF in a Tikiwiki blog post?](http://bit.ly/1hq8tnn)
