[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

can you do this with html?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 3

File: INBvStO.png (312KB, 506x662px) Image search: [Google]
INBvStO.png
312KB, 506x662px
Programming fags
why doesn't this work?

<input type="file" name="flash">
<object>
<embed src="flash" width="100%" height="100%"></embed>
</object>


i don't know a shit about programming
but i just wanted to try making a html page that has file select button and then shows the .swf selected
>>
What do you mean by "shows"? Play it?
>>
>>59538762
yeah exactly.
>>
If you wanna use swf, you're gonna need a flash plugin. Flash is depracated and dangerous to use. Don't use it. Ever.
Read about HTML5, especially canvas, and then about JS.
>>
File: 1488856575599.gif (48KB, 600x600px) Image search: [Google]
1488856575599.gif
48KB, 600x600px
>>59538833
i was pretending to do it only using html.

and if i just use

<embed src="file.swf" width="100%" height="100%"></embed>

if i specify the file beforehand it works, but i just wanted it to be selectable instead of having to write the filename in the code.

but regardless, thank you.
>>
>>59538890
Then use javascript to update the file name in your html code based on selection from a list etc...thats the kind of shit its used for.
>>
>>59538958
>Then use javascript to update the file name in your html code based on selection from a list etc.
Oh i didn't know js is client-sided.
thanks a lot i'll post it if i make it work.
>>
File: 1483054230091.png (66KB, 425x258px) Image search: [Google]
1483054230091.png
66KB, 425x258px
I got this

<!DOCTYPE html>
<html>
<body>

<input type="file" id="flash">

<button onclick="myFunction()">Play File</button>

<script>
function myFunction()
{
var filename = (function() {return document.getElementById("flash").files; })();
var parent = $('embed#replaceme').parent();
var newElement = "<embed src='filename' id='replaceme'>";

$('embed#replaceme').remove();
parent.append(newElement);

}
</script>


<object>
<embed src="replaceme" id="swf" width="100%" height="100%"></embed>
</object>

</body>
</html>



But i didn't work, i'm not sure what did i miss.
>>
>>59539779
I'm not updated on the new file APIs in HTML5, but I'm pretty sure you'll have to get the user to upload his file (hit submit) and then show another <object> with the just uploaded file embedded.
Thread posts: 9
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.