Is there a way that a button activate another button action?

Hi guys, I was wondering. Is there a way to, when you click a button, it activates another button too? for my example I have this site were I’m creating a complex interactive list of videos from youtube.

I have thematic buttons, like Jazz, Blues, Funk. When each of this button is clicked, a pannel with suboptions loads and each Button under makes the video player play a list of genre, like jazz>smooth jazz = [play that list of jazz videos] . blues>nu blues= [plays nu blues videos]. However, when I click the principal thematic Buttom , the new pannel opens and the last one hide. But I would like this button also execute the action of the first subbutton in the selected pannel. Its to say, if I click , the pannel of types of blues loads on, and ALSO the first option, is triggered, so it starts to play, and the color schemes, messages, links and images this theme button loads on click also execute automatically.

I know it’s difficult to understand the process, hope its clear. Thank you for any support.

note: the main objective of make a button activates the secondary button is because the list of videos i’m talking about is a huge list and is of random selection per click. so it would be a mess to configure the same list repeated in the main theme button. more than that, It would be interesting if the main button also randomized the sub-button it would activate. But I don’t know if its asking too much right now.

So if I understand this you want the Blues button to do something and play nu blues videos.

So why not just write in that specific button functions to do whatever you need it to do and to start playing the videoplayer which is connected to your nu blues video dataset.
https://www.wix.com/corvid/reference/$w.VideoPlayer.html#play

because the blues button opens a pannel to a lot of kinds of blues genre, as do the other styles like vintage music with a selection of sucess from 20s to 40s, jazz button with a collection from noir to modern jazz, chill out button with lo-fi from vapor wave. and each subgenre button, like smooth jazz or vapor wave is coded to load a random video from a list of 30+ each… i dont know if i can create a random list for all this styles, keeping it separated, and keeping it activating random through dataset (sorry for my ignorance in the subject).

Anyway, I have seen this question asked a lot before but there is never a conclusive answer. Is it impossible to make a button activate/trigger another button in corvid? Like it would be in java script, something like — $(“ButtonName”).click(); ?

Also, thank you verry much for trying to help me!!! Really apreciate it!

You can get a button to work with a onClick event handler like this.

export function forgotPassword_onclick(event) {
// With the event handler being added through the properties panel for the element
$w("#forgotPassword").onClick( (event) => {
// With the event handler function written into the code itself, so no need to add it through properties panel.

See here for adding custom events.

Also, going back to your music, you might want to look at using reference fields if you wanting to work with multiple datasets etc.
https://support.wix.com/en/article/about-reference-fields-in-database-collections