Hello currently I am showing some .swf files inside my website but I don't know if I have left any case for potential security flaws or if the way I am using the swf files isnt correct for all browsers or slows down the page not sure if im doing it right.
This is the code I have now:
<object width="200" height="300" data="album.swf"></object>
I read on this post: How to embed a SWF file in an HTML page?
I am puzzled because the above method mentioned on the post appears to slow down the website with the javascript calling and all.
What is your opinion? Why do they use swfobject?
Edit: Is this correct?
<embed allowScriptAccess="never" allownetworking="none" src="album.swf" type="application/x-shockwave-flash" quality="high" width="750" height="463" name="Album" />
Thank you!
Related
To import and use svg file in sveltekit I refer to this article
https://riez.medium.com/svelte-kit-importing-svg-as-svelte-component-781903fef4ae
By the way, when I finally input the code
<svelte:component this={Logo} />
I got the error like below
<svelte:component this={...}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules
I wish someone help me with this problem.
There is a SvelteKit plugin for inlining SVG:s. You can use the plugin in three different ways:
As a Svelte Component
As URL (e.g for use in an img tag)
As raw text (e.g for use in {#html rawText})
https://www.npmjs.com/package/#poppanator/sveltekit-svg
Looking through the article it seems to be solving a problem that doesn't exist in a way that is much more elaborate than needed.
In Svelte you can make a .svelte component that only contains SVG markup (inline), then use the svelte:component tag as you would with any other content.
Parent.svelte
<script>
import Circle from './Circle.svelte'
</script>
<svelte:component this={Circle} />
Circle.svelte
<svg viewbox="0 0 200 200">
<circle cx="100" cy="100" r="20"/>
</svg>
Here's a REPL showing how to switch between components that only have SVG in them.
You can even add stuff to the SVG components to make them dynamic since it's just markup like shown in this REPL.
In svelte-kit You can fix it by trying
<img src={YourSVGComponent} />
It worked for me.
I'm performing a F:AJAX call where I receive a byte Stream output whose content type is application PDF. I want this bytestream to be loaded in a JSF equivalent tag which should make me specify the content type as "Application/PDF" during tag declaration. Also, f:View fails saying content type not supported. Any JSF specific tags to cater this. Thanks.
Use iframe tag. This line shows how to use it:
<iframe src="foo.pdf" width="600" height="400" scrolling="no"></iframe>
If you also want to hide the (default) border, add frameBorder="0".
There is also pdf.js library that allows to browse pdf in browser. https://blog.oio.de/2014/04/11/integrating-pdf-js-pdf-viewer-web-application/
The answer is no there isn't such a tag.
To be honest there's no need to change it, since using HTML for this is fine and really the simplest way. You can use IFRAME (like Jay Smith shows you) or OBJECT.
The same way is presented on PrimeFaces's showcase:
<h3>PDF</h3>
<object type="application/pdf"
data="/showcase/resources/demo/media/guide.pdf?pfdrid_c=true"
height="300px" width="100%" internalinstanceid="3">
Your browser can't display pdf,
click
to download pdf instead.
</object>
I am implementing small software with JSF. I would like to show users' photos from Picasa, but I have no idea what is the best way to do it? There can be many users and everyone of them has their own Picasa albums.
What do you recommend and why? Is it the wisest to use already implemented JavaScript-softwares like JQuery plugins or Googles Picasa Web Albums Data API to fetch photos etc?
Thanks!
Sami
EDIT:
Have you or somebody else tried Fancybox, I have problems with js and css-files and I think that because of paths to those files. What is the correct way to refer to JS and CSS-files in JSF-files.
I recommend using a jQuery based solution like Picasa Webalbum Integrator. All you have to do is to add the required script files to your page and call the needed function, passing it the username of the gallery, like this:
<script type="text/javascript">
$(document).ready(function() { //-- default jQuery call, do stuff when page is loaded
$("#container").pwi({ //--specify your DIV's ID here
username: '#{user.userName}'
});
});
</script>
Where #{user.userName} is an EL expression pointing to the name of the user which gallery you want to show.
My mistake!
Two things what you have to remember when using jquery plugins with JSF.
<h:outputStylesheet library="css" name="pwi.css" />
<h:outputScript library="js" name="jquery.pwi.js" />
You have to use those tags. I used only h:outputScript for both of them and it seems to be ok, but of course not, generated html wasn't ok.
Other thing was that:
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
I am using jquery with is in Primefaces, without it there is a conflict between jquery versions or pwi doesn't find jquery at all. At least I think so :) No everything is working fine, so I am happy!
Sami
I'm trying to create an SVG document that includes image tags referencing png files. This works if I include the absolute path of the png in every image tag but if I try putting an xml:base attribute in it doesn't seem to work in IE9. However it does seem to work Firefox and Chrome. Is there a bug in IE or is there something wrong with my syntax?
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:base="file:///C:/SVG/Devices/valves/">
<image width="40" height="56" x="10" y="10" xlink:href="motorised_valve[purple].gif"/>
</svg>
For complicated reasons I don't want to go into here, I can't put the SVG document into the same folder as the images.
Thanks for any help
Mog
Would it be acceptable in your case to embed your PNG images in your document using the data:// protocol? That would solve your problem, at the expense of potentially making the XML rather large.
I am looking for recommendations for a free image gallery, compatible with ASP.NET and which can load the images reading the location from an xml file.
something like this
<?xml version="1.0"?>
<gallery>
<image id="bk101">
<name>image1.png</name>
<title>this is a sample image 1 </title>
</image>
<image id="bk102">
<name>image2.png</name>
<title>this is a sample image 2 </title>
</image>
</gallery>
Have you tried Simple Viewer? I tried it a while back and found it easy to set up with XML files. It's flash based, but you didn't put restrictions on how the gallery was implemented.
Actually, while I am not sure about the asp compatibility, etc, the easier road could be installing something that does quite of the work for you. Some pair of good solutions could be http://bitnami.org/stack/coppermine and http://bitnami.org/stack/gallery