This zone is sleeping right now! ZzzZZzzz

Better not disturb it! ~You go to the petrol station and buy a slushy instead, everything is cool!~

This area will open again in 000.beats!

(Learn about Swatch Time)

Some other zones are awake :^]


Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @23.94
Activity rating: Three Stars Posts & Arts: 33/1k.beats Random | Recent Posts | Guild Recents
News: :ha: :pc: Hello Melonland! :pc: :happy: Guild Events: Summerween Watch-a-thon

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Putting JS script inside of an HTML table?


« previous next »
Pages: [1] Print Embed
Author Topic: Putting JS script inside of an HTML table?  (Read 1789 times)
tarraxahum
Sr. Member ⚓︎
****
View Profile WWWArt


Xx_O_o_xX
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: tarraxahum
iMood: tarraxahum
Matrix: Chat!

Guild Memberships:
Artifacts:
First 1000 Members!Joined 2022!
« on: a Winter night » Embed

I honestly don't know how to formulate that title any better than this.

So here's the thing. There's this music player for tumblr themes and websites, SCM Music Player. Great thing, lets you choose a skin or even build your own, lets you create a playlist using YouTube videos (which means you don't have to upload mp3s anywhere), etc.

And I had this brilliant idea to have multiple of such players on a page by sticking them inside separate sections of an HTML table.

Well, what I'm quickly learning is that the script for the SCM player is coded in a way that it can only stick to the top or the bottom of the whole page, and putting the script code inside the td section of the table code does nothing to change that.

Which is where I'm faced with the brutal realization that I don't know JS that well (I'm mostly at "putting bricks of pre-made code together" stage of my website making experience…) to know how to do the thing I want to do.

For context, the code for the player looks like this:

Code
<!-- SCM Music Player https://www.scmplayer.net -->
<script type="text/javascript" src="https://www.scmplayer.net/script.js" 
data-config="{'skin':'skins/cyber/skin.css','volume':50,'autoplay':false,'shuffle':false,'repeat':1,'placement':'top','showplaylist':false,'playlist':[{'title':'VALKILLY -TOKYO RED (HUBRID Remix)','url':' in Reverse-Zombified','url':' ></script>
<!-- SCM Music Player script end -->

And the corresponding script goes thusly and scares my newbie butt with its complexity.

And what I had in my head before I got the reality check looks like this (roughly mocked up; the table is borderless but basically every element is in its own section, this is a 3x2 table):

https://i.ibb.c:ha:X82TnHP/Screenshot-45.jpg

Soooo this is the point where I gesture to all of this helplessly and ask if anyone would be so kind and point me to whatever could be done with the table code or the script (suppose I could download it to tweak) to make my vision come true and squish the player in that table frame.

Or to some other way to make a YouTube powered music player that could be squished into a table more easily.

Or just tell me that I'm in over my head, that works too! :grin:

Logged


https://tarraxahum.neocities.org/pofub.png
https://i.postimg.cc/3Nyfy9zP/userbar.png
https://i.postimg.cc/13ZPQNNr/uservodka.png
"Why change the past, when you can own this day?" (c)
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
You're a Star!I got robbed by Dan Q on Melonland!Flinstone VitaminAlways working hard!Known Apple shillcoolest melon on the web!
« Reply #1 on: a Winter night » Embed

Iv not looked at the code much - it looks annoying :tongue: but a super hacky solution that should totally work would be to put an iFrame in each player box of your table and then have the separate players in separate html files in your iframes. They'd be forced into the table because they'd be forced to stay inside their iframes! You'd have to fiddle a bit to make it look cohesive but I think it should work without too much trouble as long as you get the sizes right.

« Last Edit: a Winter night by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Visited on Melon's 10th Anniversary!Wildflowers!Red TulipMellohiI met Dan Q on Melonland!?Flowers
cinni
Sr. Member ⚓︎
****
View Profile WWW


believe in your dreams <3
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: cinni

Artifacts:
First 1000 Members!OG! Joined 2021!
« Reply #2 on: a Winter night » Embed

not that i have a solution, but i found from personal experience that scmplayer does not work in iframes :sad:

edit: upon searching i found this! https://github.com/blackle/blamscamp looks like it could be right up your alley, i'll hafta look further into it

« Last Edit: a Winter night by cinni » Logged

tarraxahum
Sr. Member ⚓︎
****
View Profile WWWArt


Xx_O_o_xX
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: tarraxahum
iMood: tarraxahum
Matrix: Chat!

Guild Memberships:
Artifacts:
First 1000 Members!Joined 2022!
« Reply #3 on: a Winter night » Embed

Okay I'm back, can confirm, scmplayer does not work in iframes :tongue:

looks like it could be right up your alley, i'll hafta look further into it

I will look into it, thanks! From what I see at the first glance it still uses mp3s stored on the website or elsewhere, and I'd hoped to cheat the system with SCM's ability to play from YouTube, but maybe I just need to bite the bullet and load some songs onto a dropbox :grin:

Logged


https://tarraxahum.neocities.org/pofub.png
https://i.postimg.cc/3Nyfy9zP/userbar.png
https://i.postimg.cc/13ZPQNNr/uservodka.png
"Why change the past, when you can own this day?" (c)
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Zap! Want to Login or Join ? Forum Art Hub Chat Webring Editor Recent Edits Tenement Arcade Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers Frutiger Aero Forum m15o's Web Services 32Bit Cafe iMood
Minecraft: Online
Join: craft.melonking.net