Embedding 3rd party code won't work

H guys,

I know from reading other posts that when it comes to 3rd party code you don’t often like to get involved and ask people to get in touch with the writers of the code and get their help instead of yours.

The thing is I know the code works as I have embedded it on a different site of mine that isn’t running X and it worked fine. When I copy the code and try and paste in a post It shows the NHS logo at the bottom of the area but a huge white space above where a quizs should appear. I am guessing that there is something in X that is stopping the quizs from loading but I am unable to track down what the problem might be.

Could you help please?

The code for the quizs are:

<script language="javascript">
$(window).on('message', function(e) {
	var tmp = (eval('(' +e.originalEvent.data+')'));
	window.hasOwnProperty = window.hasOwnProperty || Object.prototype.hasOwnProperty;
	if(tmp.hasOwnProperty('nhs_redirect')){
		window.location.href = tmp.nhs_redirect;
	}
});    
</script>
<div id="assessment_webpart_wrapper" style="width:362px;">
  <iframe style="width:100%;height:500px;" title="self assessments" src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/assessment.html?ASid=44&syndicate=true" frameborder="no" scrolling="no"></iframe>
  <div id="assessment_webpart_branding" style="float:right;"><a href="http://nhs.uk/tools/" alt="content provided by NHS Choices"><img src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/images/syndication.png" width="264" height="38" border="0" alt="content provided by NHS Choices" /></a></div>
</div>

<script language="javascript">
$(window).on('message', function(e) {
	var tmp = (eval('(' +e.originalEvent.data+')'));
	window.hasOwnProperty = window.hasOwnProperty || Object.prototype.hasOwnProperty;
	if(tmp.hasOwnProperty('nhs_redirect')){
		window.location.href = tmp.nhs_redirect;
	}
});    
</script>
<div id="assessment_webpart_wrapper" style="width:362px;">
  <iframe style="width:100%;height:376px;" title="self assessments" src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/assessment.html?ASid=42&syndicate=true" frameborder="no" scrolling="no"></iframe>
  <div id="assessment_webpart_branding" style="float:right;"><a href="http://nhs.uk/tools/" alt="content provided by NHS Choices"><img src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/images/syndication.png" width="264" height="38" border="0" alt="content provided by NHS Choices" /></a></div>
</div>

Hi there,

Is the site where you are trying to embed the code an https site?

If so, please update the links in the src field to https:

<iframe style="width:100%;height:500px;" title="self assessments" src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/assessment.html?ASid=44&syndicate=true" frameborder="no" scrolling="no"></iframe>
  <div id="assessment_webpart_branding" style="float:right;"><a href="http://nhs.uk/tools/" alt="content provided by NHS Choices"><img src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/images/syndication.png" width="264" height="38" border="0" alt="content provided by NHS Choices" /></a></div> 

<iframe style="width:100%;height:376px;" title="self assessments" src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/assessment.html?ASid=42&syndicate=true" frameborder="no" scrolling="no"></iframe>
  <div id="assessment_webpart_branding" style="float:right;"><a href="http://nhs.uk/tools/" alt="content provided by NHS Choices"><img src="http://media.nhschoices.nhs.uk/tools/documents/self_assessments_js/images/syndication.png" width="264" height="38" border="0" alt="content provided by NHS Choices" /></a></div>

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.