3

new to visualforce. Having a play around.

Anyone know why this wont embed on VF page? When i preview i just get a blank page

<apex:page >
<apex:iframe width="854" height="510" src="//www.youtube.com/embed/SGPvYQ1o2x4" frameborder="0"/>
</apex:page>
2
  • 1
    aren't you missing the http: in the src tag?
    – akarnid
    Oct 3, 2014 at 12:43
  • 1
    I guess this is a case where protocol relative URLs don't work.
    – Keith C
    Oct 3, 2014 at 13:33

1 Answer 1

3

The protocol relative source URL does not work. Try:

<apex:page >
    <apex:iframe width="854" height="510" src="https://www.youtube.com/embed/SGPvYQ1o2x4" frameborder="0"/>
</apex:page>

-Answer edited to incorporate Keith C's comment

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.