I just developed a sample openlaszlo application containing HTML tag loading openlaszlo site. And i developed a sample air application having another html tag and i loaded the openlaszlo application through the air application. For some reason i am not able to see the html content of the openlaszlo application.
Has anyone come across this kind of issues?
#karthick In your comments on your question you stated that "The html is behind the SWF": The solution to this problem is to set the Window Mode attribute of the SWF (Flash) object to "transparent":
Example:
a) Direct Flash embed syntax:
<object ...>
...
<param name="wmode" value="transparent"></param>
</object>
b) OpenLaszlo JavaScript embed syntax:
lz.embed.swf({
url: 'http://www.mysite.com/myapp.lzx.swf10.swf?lzr=swf10', wmode: 'transparent', ... });
Related
Should both of these code blocks be used?
Should only one code block be used? If so, which one?
code per video.js
<video
id="my-player"
class="video-js"
controls
preload="auto"
poster="//vjs.zencdn.net/v/oceans.png"
data-setup='{}'>
<source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"></source>
<source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm"></source>
<source src="//vjs.zencdn.net/v/oceans.ogv" type="video/ogg"></source>
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that
<a href="http://videojs.com/html5-video-support/" target="_blank">
supports HTML5 video
</a>
</p>
</video>
code per amp-video-iframe
function onAmpIntegrationReady(ampIntegration) {
var myVideo = document.querySelector('#my-video');
ampIntegration.listenTo('videojs', myVideo);
}
amp-video-iframe is not supported by amp-story. The supported tags, depend on what type of layer you are using, but for amp-story-grid-layer they can be found here. Notably, if you are looking to play video, amp-video is currently the only way to do it. Since amp-video-iframe supports AMP's video interface, you can see this GitHub issue to track the implementation/support for this feature.
But, to answer your question (as it is relevant for AMP pages that are not stories): both snippets are necessary. The first code snippet adds the video to the page, while the second code snippet listens for events like play and pause to communicate them back and forth to the AMP runtime. Note that you'll need to make sure that the IDs are the same (in the code you've posted, the HTML refers to the video by the ID my-player, while the JS refers to the video by the ID my-video).
I have a web app that uses primefaces extensions.
If I use
<pe:documentViewer id="verPdf"
height="500"
name="/resources/pdf/#{utentesBean.nomeFile}" />
it does not render PDF in view.
if I use
<pe:documentViewer id="verPdf"
height="500"
name="/resources/pdf/441.pdf" />
it shows the PDF .
Can anyone give an idea ?
Thank you.
I am one of the developers of the document viewer component and I just tested it and it worked fine with both of the following:
<pe:documentViewer url="/sections/documentviewer/#{controller.bookFile}"/>
<pe:documentViewer library="books" name="#{controller.hoodFile}"/>
One thing I noticed above in your example is you were not using URL you were using "name" attribute and name is meant to be used with "library" as in my example above as a relative path to a resource folder called "books".
I think you want to change your code to...
<pe:documentViewer id="verPdf"
height="500"
library="pdf"
name="#{utentesBean.nomeFile}" />
I am new to aurelia. This sample code under the html tab works fine in JSbin:
http://jsbin.com/yiqodilaho/edit?html,js,output
But generates an error in seeCode.run (the online editor that we are developing)
https://seecode.run/#-KAbCyh8F6SpHiTVpOfq .I found that its not working as iframe has set of restrictions and so doesnt allow scripts, API's or form submissions. So, I have used "Sandbox" attribute . sandbox="allow-modals allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts" and it working fine. Now, we have migrated the front end of the project to Aurelia and same problem has occured again. This time adding sandbox attribute couldnt make any difference. Can Somehow help me with this issue..? Does Sanbox attribute work in Aurelia?
Are you asking if aurelia's binding system supports <iframe sandbox.bind="tokens">? It does not support this. HTMLIFrameElement.sandbox is a DOMSettableTokenList which needs to be assigned like this: f.sandbox.value = '...' and aurelia is assigning it like this f.sandbox = '...'.
https://gist.run/?id=7dca16fd08dff85cf71f2fef1c439baf
You should be able to use it like this still: <iframe sandbox="allow-pointer-lock" ...
https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement
https://msdn.microsoft.com/en-us/library/hh771918(v=vs.85).aspx
Some (not all) of the html documents generated by Seaside have these elements in it:
<body onload="onLoad()">
<script type="text/javascript">/*<![CDATA[*/function onLoad(){};/*]]>*/</script>
I do not use any Javascript in these documents and i wonder, where this comes from, and if/how i can prevent these parts from being added.
Seaside generates this markup in the class WADefaultScriptGenerator. Unfortunately the markup needs to be generated even if you don't use Javascript, as this is not know when Seaside opens the <body> tag.
You can customize (or avoid the Javascript markup generation) by subclassing WAScriptGenerator and setting your custom class in the application configuration. Either through the configuration interface or programmatically:
application := WAAdmin register: MyRootComponent asApplicationAt: 'myapp'.
application preferenceAt: #scriptGeneratorClass put: MyScriptGenerator.
I need to embed Foxit Reader (PDF reading software) into a web page. Does anybody know the correct classid and parameters to use in the following code:
<object id="pdfReaderObj" classid="CLSID:XXXX" width="500" height="700">
<param name="Filename" value="/1234-56789-abc-123-3.pdf">
<param name="SRC" value="/1234-56789-abc-123-3.pdf">
You must install Foxit Reader to view this document.
</object>
Additionally if anyone has experience of enterprise deployment, silent installation, registry setting etc. These would also be welcomed.
Thanks
Foxit Reader itself doesn't include any embeddable components; they have Foxit Reader ActiveX for this purpose, which is a paid component distributed separately from the Reader. For example, the Standard ActiveX version can be embedded into a web page in the following way:
<script type="text/javascript"">
function openFile() {
document.getElementById("foxitReader").OpenFile("foo.pdf", "");
}
</script>
<body onload="openFile()">
<object id="foxitReader"
classid="clsid:DB2189DF-ABF4-445A-A4E5-BF32F2CEA4D9"
width="800" height="600">
<p>You must install Foxit Reader ActiveX to view this PDF file.</p>
</object>
</body>
(I'm not a web developer, so this code may be far from perfect, but it should help you get the idea.)
If using Foxit Reader ActiveX is not an option for you, take a look at this question which discusses other possible ways of displaying PDF content.