SimplePortal

Support => English Support => Topic started by: Squibby on August 03, 2015, 04:28:41 PM

Title: Javascript linked to a page: How do I do this
Post by: Squibby on August 03, 2015, 04:28:41 PM
I have a html website with a page that had a javascript game in it.  The javascript was in a separate .js file. 
I am wondering how to get this to work in a portal page.
Any advice will be good.
Title: Re: Javascript linked to a page: How do I do this
Post by: ♦ Ninja ZX-10RR ♦ on August 03, 2015, 04:53:59 PM
Create an HTML page and put this inside of it.
Code: [Select]
<script type="text/javascript" src="yourjavascriptfilepath.js"></script>It should work.

Regards
Title: Re: Javascript linked to a page: How do I do this
Post by: Squibby on August 04, 2015, 10:38:47 AM
Didnt seem to work but I got around the problem by adding page in a iframe on site.
Now trying to add a midi file to a post.
Added simple embed mod.
Tried <embed> and ahref to link to mid file but no avail.
Tried to paste above into block but no result either


Title: Re: Javascript linked to a page: How do I do this
Post by: ♦ Ninja ZX-10RR ♦ on August 04, 2015, 10:51:09 AM
.midi is an extremely old file format and used exclusively for electronic music these days, I was using it occasionally at school with old Motorola v360 phones... It's a 1980's format and you'd need to embed a player for those, but I don't know any :/

By the way you can't just <embed> stuff and thinking it will work, you need to add proper logic for it to work, something like the youtube video embedder: it has its own logic behind it (on SMF side), otherwise it wouldn't work.

Regards
SimplePortal 2.3.8 © 2008-2024, SimplePortal