Issue when embedding google trends

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/26/2013 8:45:28 PM
Gravatar
Total Posts 27

Issue when embedding google trends in fragmented html

Does anyone have luck in embedding Google Trends chart as iframe or fragmented html? For example, I added "fish" to the trend

http://www.google.com/trends/explore#q=fish&cmpt=q

Then google generated the following code to embed in html file

<script type="text/javascript" src="//www.google.com/trends/embed.js?hl=en-US&q=fish&cmpt=q&content=1&cid=TIMESERIES_GRAPH_0&export=5&w=500&h=330"></script>

When I put the code in a fragmented html file like below, and include in a page, it shows blank.

<b>

<script type="text/javascript" src="//www.google.com/trends/embed.js?hl=en-US&q=fish&cmpt=q&content=1&cid=TIMESERIES_GRAPH_0&export=5&w=500&h=330"></script>

</b>

 

 

 

5/28/2013 12:39:14 PM
Gravatar
Total Posts 18439

Re: Issue when embedding google trends

I would disable the wysiwyg editor in the settings the html content instance where you want to embed it, in case the editor is modifying what you entered.

Hope that helps,

Joe

5/28/2013 2:38:54 PM
Gravatar
Total Posts 27

Re: Issue when embedding google trends

Disabling the editor did not need help. Thanks.

5/28/2013 3:04:39 PM
Gravatar
Total Posts 2253

Re: Issue when embedding google trends

I think Joe thought you were using the HTML Content Module for this but it sounds to me like you're using the HTML Fragment Include. Disabling the WYSIWYG isn't going to help at all with the Fragment Include module.

I was able to use the code you shared in a fragment include here but it's not reliable. I originally added it to a site using IE 10 and it was fine but on refresh, I get a message stating the content cannot be displayed in an iFrame and when clicking the link to view it in it's own window I would get a message from Google stating the query was bad. Even when viewing the html file on it's own (outside of mojo), it's not reliable in IE. It's consistently working fine in FireFox.

So, I think this problem is with IE and Google, not mojoPortal.

HTH,
Joe D.

5/28/2013 3:23:56 PM
Gravatar
Total Posts 27

Re: Issue when embedding google trends

It sounds like that Google does not allow their content embedded in frame or iframe any longer. In ie, I get error, but in Firefox, I get a blank screen. Not sure why they display the "embed" button in the 1st place if it does not allow. Thanks for your help anyway.

You must sign in to post in the forums. This thread is closed to new posts.