I created a working CDF file on my Mac, and I am trying to embed it into an html page, and although I followed all the steps suggested on the mathematica web embedding page, it is not working (I always get a white page when I try to open my page). This is what I have done so far:
- I exported my Mathematica code as a CDF standalone "AGN-standaloneClear.cdf", checked and it is working with CDF Player
I opened TextEdit, converted to plain text and wrote:
<html> <body> <embed src="AGN-standaloneClear.cdf” width=“1380” height=“6792”> </body> </html>
and saved it as test.html into the same folder where the cdf is.
When I try to open it with Chrome the page is completely white however, and if I try to reopen the test.html file it is completely white. I never tried to deal with html, so I think I could be doing some very noob errors that are not even explained in the guides I read so far, but however I don't know what to do.
-EDIT-
Here is the code that generates the white page:
<html>
<head>
</head>
<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="prova.png"></a>');
cdf.embed('AGNstandaloneClear.cdf', 1380, 6792);
</script>
</body>
</html>
and here is the one that generates the cropped cdf (http://postimg.org/image/tgqa3bicl/):
<html>
<head>
</head>
<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="prova.png"></a>');
cdf.embed('AGNstandaloneClear.cdf', 435, 325);
</script>
</body>
</html>
width
value)- they sometimes cause problems. $\endgroup$